{-# 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.Rename
(
ResourcesFeaturesRenameResource
, resourcesFeaturesRename
, ResourcesFeaturesRename
, rfrPayload
, rfrCustomer
, rfrOldName
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesFeaturesRenameResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"features" :>
Capture "oldName" Text :>
"rename" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] FeatureRename :> Post '[JSON] ()
data ResourcesFeaturesRename = ResourcesFeaturesRename'
{ _rfrPayload :: !FeatureRename
, _rfrCustomer :: !Text
, _rfrOldName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesFeaturesRename
:: FeatureRename
-> Text
-> Text
-> ResourcesFeaturesRename
resourcesFeaturesRename pRfrPayload_ pRfrCustomer_ pRfrOldName_ =
ResourcesFeaturesRename'
{ _rfrPayload = pRfrPayload_
, _rfrCustomer = pRfrCustomer_
, _rfrOldName = pRfrOldName_
}
rfrPayload :: Lens' ResourcesFeaturesRename FeatureRename
rfrPayload
= lens _rfrPayload (\ s a -> s{_rfrPayload = a})
rfrCustomer :: Lens' ResourcesFeaturesRename Text
rfrCustomer
= lens _rfrCustomer (\ s a -> s{_rfrCustomer = a})
rfrOldName :: Lens' ResourcesFeaturesRename Text
rfrOldName
= lens _rfrOldName (\ s a -> s{_rfrOldName = a})
instance GoogleRequest ResourcesFeaturesRename where
type Rs ResourcesFeaturesRename = ()
type Scopes ResourcesFeaturesRename =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesFeaturesRename'{..}
= go _rfrCustomer _rfrOldName (Just AltJSON)
_rfrPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesFeaturesRenameResource)
mempty