{-# 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.IAM.Roles.Get
(
RolesGetResource
, rolesGet
, RolesGet
, rgXgafv
, rgUploadProtocol
, rgAccessToken
, rgUploadType
, rgName
, rgCallback
) where
import Network.Google.IAM.Types
import Network.Google.Prelude
type RolesGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Role
data RolesGet = RolesGet'
{ _rgXgafv :: !(Maybe Xgafv)
, _rgUploadProtocol :: !(Maybe Text)
, _rgAccessToken :: !(Maybe Text)
, _rgUploadType :: !(Maybe Text)
, _rgName :: !Text
, _rgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rolesGet
:: Text
-> RolesGet
rolesGet pRgName_ =
RolesGet'
{ _rgXgafv = Nothing
, _rgUploadProtocol = Nothing
, _rgAccessToken = Nothing
, _rgUploadType = Nothing
, _rgName = pRgName_
, _rgCallback = Nothing
}
rgXgafv :: Lens' RolesGet (Maybe Xgafv)
rgXgafv = lens _rgXgafv (\ s a -> s{_rgXgafv = a})
rgUploadProtocol :: Lens' RolesGet (Maybe Text)
rgUploadProtocol
= lens _rgUploadProtocol
(\ s a -> s{_rgUploadProtocol = a})
rgAccessToken :: Lens' RolesGet (Maybe Text)
rgAccessToken
= lens _rgAccessToken
(\ s a -> s{_rgAccessToken = a})
rgUploadType :: Lens' RolesGet (Maybe Text)
rgUploadType
= lens _rgUploadType (\ s a -> s{_rgUploadType = a})
rgName :: Lens' RolesGet Text
rgName = lens _rgName (\ s a -> s{_rgName = a})
rgCallback :: Lens' RolesGet (Maybe Text)
rgCallback
= lens _rgCallback (\ s a -> s{_rgCallback = a})
instance GoogleRequest RolesGet where
type Rs RolesGet = Role
type Scopes RolesGet =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient RolesGet'{..}
= go _rgName _rgXgafv _rgUploadProtocol
_rgAccessToken
_rgUploadType
_rgCallback
(Just AltJSON)
iAMService
where go
= buildClient (Proxy :: Proxy RolesGetResource)
mempty