{-# 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.Comments.Insert
(
CommentsInsertResource
, commentsInsert
, CommentsInsert
, cActivityId
, cPayload
) where
import Network.Google.PlusDomains.Types
import Network.Google.Prelude
type CommentsInsertResource =
"plusDomains" :>
"v1" :>
"activities" :>
Capture "activityId" Text :>
"comments" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Comment :> Post '[JSON] Comment
data CommentsInsert = CommentsInsert'
{ _cActivityId :: !Text
, _cPayload :: !Comment
} deriving (Eq,Show,Data,Typeable,Generic)
commentsInsert
:: Text
-> Comment
-> CommentsInsert
commentsInsert pCActivityId_ pCPayload_ =
CommentsInsert'
{ _cActivityId = pCActivityId_
, _cPayload = pCPayload_
}
cActivityId :: Lens' CommentsInsert Text
cActivityId
= lens _cActivityId (\ s a -> s{_cActivityId = a})
cPayload :: Lens' CommentsInsert Comment
cPayload = lens _cPayload (\ s a -> s{_cPayload = a})
instance GoogleRequest CommentsInsert where
type Rs CommentsInsert = Comment
type Scopes CommentsInsert =
'["https://www.googleapis.com/auth/plus.login",
"https://www.googleapis.com/auth/plus.stream.write"]
requestClient CommentsInsert'{..}
= go _cActivityId (Just AltJSON) _cPayload
plusDomainsService
where go
= buildClient (Proxy :: Proxy CommentsInsertResource)
mempty