{-# 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.PlusDomains.Circles.Patch
(
CirclesPatchResource
, circlesPatch
, CirclesPatch
, cpPayload
, cpCircleId
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CirclesPatchResource =
"plusDomains" :>
"v1" :>
"circles" :>
Capture "circleId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Circle :> Patch '[JSON] Circle
data CirclesPatch = CirclesPatch'
{ _cpPayload :: !Circle
, _cpCircleId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
circlesPatch
:: Circle
-> Text
-> CirclesPatch
circlesPatch pCpPayload_ pCpCircleId_ =
CirclesPatch'
{ _cpPayload = pCpPayload_
, _cpCircleId = pCpCircleId_
}
cpPayload :: Lens' CirclesPatch Circle
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a})
cpCircleId :: Lens' CirclesPatch Text
cpCircleId
= lens _cpCircleId (\ s a -> s{_cpCircleId = a})
instance GoogleRequest CirclesPatch where
type Rs CirclesPatch = Circle
type Scopes CirclesPatch =
'["https://www.googleapis.com/auth/plus.circles.write",
"https://www.googleapis.com/auth/plus.login"]
requestClient CirclesPatch'{..}
= go _cpCircleId (Just AltJSON) _cpPayload
plusDomainsService
where go
= buildClient (Proxy :: Proxy CirclesPatchResource)
mempty