{-# 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.AddPeople
(
CirclesAddPeopleResource
, circlesAddPeople
, CirclesAddPeople
, capEmail
, capUserId
, capCircleId
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CirclesAddPeopleResource =
"plusDomains" :>
"v1" :>
"circles" :>
Capture "circleId" Text :>
"people" :>
QueryParams "email" Text :>
QueryParams "userId" Text :>
QueryParam "alt" AltJSON :> Put '[JSON] Circle
data CirclesAddPeople = CirclesAddPeople'
{ _capEmail :: !(Maybe [Text])
, _capUserId :: !(Maybe [Text])
, _capCircleId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
circlesAddPeople
:: Text
-> CirclesAddPeople
circlesAddPeople pCapCircleId_ =
CirclesAddPeople'
{ _capEmail = Nothing
, _capUserId = Nothing
, _capCircleId = pCapCircleId_
}
capEmail :: Lens' CirclesAddPeople [Text]
capEmail
= lens _capEmail (\ s a -> s{_capEmail = a}) .
_Default
. _Coerce
capUserId :: Lens' CirclesAddPeople [Text]
capUserId
= lens _capUserId (\ s a -> s{_capUserId = a}) .
_Default
. _Coerce
capCircleId :: Lens' CirclesAddPeople Text
capCircleId
= lens _capCircleId (\ s a -> s{_capCircleId = a})
instance GoogleRequest CirclesAddPeople where
type Rs CirclesAddPeople = Circle
type Scopes CirclesAddPeople =
'["https://www.googleapis.com/auth/plus.circles.write",
"https://www.googleapis.com/auth/plus.login"]
requestClient CirclesAddPeople'{..}
= go _capCircleId (_capEmail ^. _Default)
(_capUserId ^. _Default)
(Just AltJSON)
plusDomainsService
where go
= buildClient
(Proxy :: Proxy CirclesAddPeopleResource)
mempty