{-# 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.Insert
(
ContactsInsertResource
, contactsInsert
, ContactsInsert
, ciPayload
) where
import Network.Google.Mirror.Types
import Network.Google.Prelude
type ContactsInsertResource =
"mirror" :>
"v1" :>
"contacts" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Contact :> Post '[JSON] Contact
newtype ContactsInsert = ContactsInsert'
{ _ciPayload :: Contact
} deriving (Eq,Show,Data,Typeable,Generic)
contactsInsert
:: Contact
-> ContactsInsert
contactsInsert pCiPayload_ =
ContactsInsert'
{ _ciPayload = pCiPayload_
}
ciPayload :: Lens' ContactsInsert Contact
ciPayload
= lens _ciPayload (\ s a -> s{_ciPayload = a})
instance GoogleRequest ContactsInsert where
type Rs ContactsInsert = Contact
type Scopes ContactsInsert =
'["https://www.googleapis.com/auth/glass.timeline"]
requestClient ContactsInsert'{..}
= go (Just AltJSON) _ciPayload mirrorService
where go
= buildClient (Proxy :: Proxy ContactsInsertResource)
mempty