{-# 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.Groups.Aliases.Insert
(
GroupsAliasesInsertResource
, groupsAliasesInsert
, GroupsAliasesInsert
, gaiGroupKey
, gaiPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type GroupsAliasesInsertResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
"aliases" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Alias :> Post '[JSON] Alias
data GroupsAliasesInsert = GroupsAliasesInsert'
{ _gaiGroupKey :: !Text
, _gaiPayload :: !Alias
} deriving (Eq,Show,Data,Typeable,Generic)
groupsAliasesInsert
:: Text
-> Alias
-> GroupsAliasesInsert
groupsAliasesInsert pGaiGroupKey_ pGaiPayload_ =
GroupsAliasesInsert'
{ _gaiGroupKey = pGaiGroupKey_
, _gaiPayload = pGaiPayload_
}
gaiGroupKey :: Lens' GroupsAliasesInsert Text
gaiGroupKey
= lens _gaiGroupKey (\ s a -> s{_gaiGroupKey = a})
gaiPayload :: Lens' GroupsAliasesInsert Alias
gaiPayload
= lens _gaiPayload (\ s a -> s{_gaiPayload = a})
instance GoogleRequest GroupsAliasesInsert where
type Rs GroupsAliasesInsert = Alias
type Scopes GroupsAliasesInsert =
'["https://www.googleapis.com/auth/admin.directory.group"]
requestClient GroupsAliasesInsert'{..}
= go _gaiGroupKey (Just AltJSON) _gaiPayload
directoryService
where go
= buildClient
(Proxy :: Proxy GroupsAliasesInsertResource)
mempty