{-# 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.Resources.Features.Insert
(
ResourcesFeaturesInsertResource
, resourcesFeaturesInsert
, ResourcesFeaturesInsert
, rfiPayload
, rfiCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesFeaturesInsertResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"features" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Feature :> Post '[JSON] Feature
data ResourcesFeaturesInsert = ResourcesFeaturesInsert'
{ _rfiPayload :: !Feature
, _rfiCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesFeaturesInsert
:: Feature
-> Text
-> ResourcesFeaturesInsert
resourcesFeaturesInsert pRfiPayload_ pRfiCustomer_ =
ResourcesFeaturesInsert'
{ _rfiPayload = pRfiPayload_
, _rfiCustomer = pRfiCustomer_
}
rfiPayload :: Lens' ResourcesFeaturesInsert Feature
rfiPayload
= lens _rfiPayload (\ s a -> s{_rfiPayload = a})
rfiCustomer :: Lens' ResourcesFeaturesInsert Text
rfiCustomer
= lens _rfiCustomer (\ s a -> s{_rfiCustomer = a})
instance GoogleRequest ResourcesFeaturesInsert where
type Rs ResourcesFeaturesInsert = Feature
type Scopes ResourcesFeaturesInsert =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesFeaturesInsert'{..}
= go _rfiCustomer (Just AltJSON) _rfiPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesFeaturesInsertResource)
mempty