{-# 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
-- | Inserts a new contact.
--
-- /See:/ 'contactsInsert' smart constructor.
newtype ContactsInsert = ContactsInsert'
{ _ciPayload :: Contact
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'ContactsInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ciPayload'
contactsInsert
:: Contact -- ^ 'ciPayload'
-> ContactsInsert
contactsInsert pCiPayload_ =
ContactsInsert'
{ _ciPayload = pCiPayload_
}
-- | Multipart request metadata.
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