{-# 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.Asps.Get
(
AspsGetResource
, aspsGet
, AspsGet
, agCodeId
, agUserKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type AspsGetResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
Capture "userKey" Text :>
"asps" :>
Capture "codeId" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Asp
data AspsGet = AspsGet'
{ _agCodeId :: !(Textual Int32)
, _agUserKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
aspsGet
:: Int32
-> Text
-> AspsGet
aspsGet pAgCodeId_ pAgUserKey_ =
AspsGet'
{ _agCodeId = _Coerce # pAgCodeId_
, _agUserKey = pAgUserKey_
}
agCodeId :: Lens' AspsGet Int32
agCodeId
= lens _agCodeId (\ s a -> s{_agCodeId = a}) .
_Coerce
agUserKey :: Lens' AspsGet Text
agUserKey
= lens _agUserKey (\ s a -> s{_agUserKey = a})
instance GoogleRequest AspsGet where
type Rs AspsGet = Asp
type Scopes AspsGet =
'["https://www.googleapis.com/auth/admin.directory.user.security"]
requestClient AspsGet'{..}
= go _agUserKey _agCodeId (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy AspsGetResource) mempty