{-# 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.Directory.Domains.Insert
(
DomainsInsertResource
, domainsInsert
, DomainsInsert
, diPayload
, diCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type DomainsInsertResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"domains" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Domains :> Post '[JSON] Domains
data DomainsInsert = DomainsInsert'
{ _diPayload :: !Domains
, _diCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
domainsInsert
:: Domains
-> Text
-> DomainsInsert
domainsInsert pDiPayload_ pDiCustomer_ =
DomainsInsert'
{ _diPayload = pDiPayload_
, _diCustomer = pDiCustomer_
}
diPayload :: Lens' DomainsInsert Domains
diPayload
= lens _diPayload (\ s a -> s{_diPayload = a})
diCustomer :: Lens' DomainsInsert Text
diCustomer
= lens _diCustomer (\ s a -> s{_diCustomer = a})
instance GoogleRequest DomainsInsert where
type Rs DomainsInsert = Domains
type Scopes DomainsInsert =
'["https://www.googleapis.com/auth/admin.directory.domain"]
requestClient DomainsInsert'{..}
= go _diCustomer (Just AltJSON) _diPayload
directoryService
where go
= buildClient (Proxy :: Proxy DomainsInsertResource)
mempty