{-# 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.Mirror.Contacts.Update
(
ContactsUpdateResource
, contactsUpdate
, ContactsUpdate
, cuPayload
, cuId
) where
import Network.Google.Mirror.Types
import Network.Google.Prelude
type ContactsUpdateResource =
"mirror" :>
"v1" :>
"contacts" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Contact :> Put '[JSON] Contact
data ContactsUpdate = ContactsUpdate'
{ _cuPayload :: !Contact
, _cuId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
contactsUpdate
:: Contact
-> Text
-> ContactsUpdate
contactsUpdate pCuPayload_ pCuId_ =
ContactsUpdate'
{ _cuPayload = pCuPayload_
, _cuId = pCuId_
}
cuPayload :: Lens' ContactsUpdate Contact
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
cuId :: Lens' ContactsUpdate Text
cuId = lens _cuId (\ s a -> s{_cuId = a})
instance GoogleRequest ContactsUpdate where
type Rs ContactsUpdate = Contact
type Scopes ContactsUpdate =
'["https://www.googleapis.com/auth/glass.timeline"]
requestClient ContactsUpdate'{..}
= go _cuId (Just AltJSON) _cuPayload mirrorService
where go
= buildClient (Proxy :: Proxy ContactsUpdateResource)
mempty