{-# 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.Analytics.UserDeletion.UserDeletionRequest.Upsert
(
UserDeletionUserDeletionRequestUpsertResource
, userDeletionUserDeletionRequestUpsert
, UserDeletionUserDeletionRequestUpsert
, ududruPayload
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type UserDeletionUserDeletionRequestUpsertResource =
"analytics" :>
"v3" :>
"userDeletion" :>
"userDeletionRequests:upsert" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserDeletionRequest :>
Post '[JSON] UserDeletionRequest
newtype UserDeletionUserDeletionRequestUpsert = UserDeletionUserDeletionRequestUpsert'
{ _ududruPayload :: UserDeletionRequest
} deriving (Eq,Show,Data,Typeable,Generic)
userDeletionUserDeletionRequestUpsert
:: UserDeletionRequest
-> UserDeletionUserDeletionRequestUpsert
userDeletionUserDeletionRequestUpsert pUdudruPayload_ =
UserDeletionUserDeletionRequestUpsert'
{ _ududruPayload = pUdudruPayload_
}
ududruPayload :: Lens' UserDeletionUserDeletionRequestUpsert UserDeletionRequest
ududruPayload
= lens _ududruPayload
(\ s a -> s{_ududruPayload = a})
instance GoogleRequest
UserDeletionUserDeletionRequestUpsert where
type Rs UserDeletionUserDeletionRequestUpsert =
UserDeletionRequest
type Scopes UserDeletionUserDeletionRequestUpsert =
'["https://www.googleapis.com/auth/analytics.user.deletion"]
requestClient
UserDeletionUserDeletionRequestUpsert'{..}
= go (Just AltJSON) _ududruPayload analyticsService
where go
= buildClient
(Proxy ::
Proxy UserDeletionUserDeletionRequestUpsertResource)
mempty