{-# 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.Insert
(
CirclesInsertResource
, circlesInsert
, CirclesInsert
, ciPayload
, ciUserId
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CirclesInsertResource =
"plusDomains" :>
"v1" :>
"people" :>
Capture "userId" Text :>
"circles" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Circle :> Post '[JSON] Circle
data CirclesInsert = CirclesInsert'
{ _ciPayload :: !Circle
, _ciUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
circlesInsert
:: Circle
-> Text
-> CirclesInsert
circlesInsert pCiPayload_ pCiUserId_ =
CirclesInsert'
{ _ciPayload = pCiPayload_
, _ciUserId = pCiUserId_
}
ciPayload :: Lens' CirclesInsert Circle
ciPayload
= lens _ciPayload (\ s a -> s{_ciPayload = a})
ciUserId :: Lens' CirclesInsert Text
ciUserId = lens _ciUserId (\ s a -> s{_ciUserId = a})
instance GoogleRequest CirclesInsert where
type Rs CirclesInsert = Circle
type Scopes CirclesInsert =
'["https://www.googleapis.com/auth/plus.circles.write",
"https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.me"]
requestClient CirclesInsert'{..}
= go _ciUserId (Just AltJSON) _ciPayload
plusDomainsService
where go
= buildClient (Proxy :: Proxy CirclesInsertResource)
mempty