{-# 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.Update
(
CirclesUpdateResource
, circlesUpdate
, CirclesUpdate
, cuPayload
, cuCircleId
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CirclesUpdateResource =
"plusDomains" :>
"v1" :>
"circles" :>
Capture "circleId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Circle :> Put '[JSON] Circle
data CirclesUpdate = CirclesUpdate'
{ _cuPayload :: !Circle
, _cuCircleId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
circlesUpdate
:: Circle
-> Text
-> CirclesUpdate
circlesUpdate pCuPayload_ pCuCircleId_ =
CirclesUpdate'
{ _cuPayload = pCuPayload_
, _cuCircleId = pCuCircleId_
}
cuPayload :: Lens' CirclesUpdate Circle
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
cuCircleId :: Lens' CirclesUpdate Text
cuCircleId
= lens _cuCircleId (\ s a -> s{_cuCircleId = a})
instance GoogleRequest CirclesUpdate where
type Rs CirclesUpdate = Circle
type Scopes CirclesUpdate =
'["https://www.googleapis.com/auth/plus.circles.write",
"https://www.googleapis.com/auth/plus.login"]
requestClient CirclesUpdate'{..}
= go _cuCircleId (Just AltJSON) _cuPayload
plusDomainsService
where go
= buildClient (Proxy :: Proxy CirclesUpdateResource)
mempty