{-# 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.RemovePeople
(
CirclesRemovePeopleResource
, circlesRemovePeople
, CirclesRemovePeople
, crpEmail
, crpUserId
, crpCircleId
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CirclesRemovePeopleResource =
"plusDomains" :>
"v1" :>
"circles" :>
Capture "circleId" Text :>
"people" :>
QueryParams "email" Text :>
QueryParams "userId" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
-- | Remove a person from a circle.
--
-- /See:/ 'circlesRemovePeople' smart constructor.
data CirclesRemovePeople = CirclesRemovePeople'
{ _crpEmail :: !(Maybe [Text])
, _crpUserId :: !(Maybe [Text])
, _crpCircleId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'CirclesRemovePeople' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'crpEmail'
--
-- * 'crpUserId'
--
-- * 'crpCircleId'
circlesRemovePeople
:: Text -- ^ 'crpCircleId'
-> CirclesRemovePeople
circlesRemovePeople pCrpCircleId_ =
CirclesRemovePeople'
{ _crpEmail = Nothing
, _crpUserId = Nothing
, _crpCircleId = pCrpCircleId_
}
-- | Email of the people to add to the circle. Optional, can be repeated.
crpEmail :: Lens' CirclesRemovePeople [Text]
crpEmail
= lens _crpEmail (\ s a -> s{_crpEmail = a}) .
_Default
. _Coerce
-- | IDs of the people to remove from the circle. Optional, can be repeated.
crpUserId :: Lens' CirclesRemovePeople [Text]
crpUserId
= lens _crpUserId (\ s a -> s{_crpUserId = a}) .
_Default
. _Coerce
-- | The ID of the circle to remove the person from.
crpCircleId :: Lens' CirclesRemovePeople Text
crpCircleId
= lens _crpCircleId (\ s a -> s{_crpCircleId = a})
instance GoogleRequest CirclesRemovePeople where
type Rs CirclesRemovePeople = ()
type Scopes CirclesRemovePeople =
'["https://www.googleapis.com/auth/plus.circles.write",
"https://www.googleapis.com/auth/plus.login"]
requestClient CirclesRemovePeople'{..}
= go _crpCircleId (_crpEmail ^. _Default)
(_crpUserId ^. _Default)
(Just AltJSON)
plusDomainsService
where go
= buildClient
(Proxy :: Proxy CirclesRemovePeopleResource)
mempty