{-# 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.BinaryAuthorization.Projects.GetPolicy
(
ProjectsGetPolicyResource
, projectsGetPolicy
, ProjectsGetPolicy
, pgpXgafv
, pgpUploadProtocol
, pgpAccessToken
, pgpUploadType
, pgpName
, pgpCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsGetPolicyResource =
"v1beta1" :>
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] Policy
data ProjectsGetPolicy = ProjectsGetPolicy'
{ _pgpXgafv :: !(Maybe Xgafv)
, _pgpUploadProtocol :: !(Maybe Text)
, _pgpAccessToken :: !(Maybe Text)
, _pgpUploadType :: !(Maybe Text)
, _pgpName :: !Text
, _pgpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGetPolicy
:: Text
-> ProjectsGetPolicy
projectsGetPolicy pPgpName_ =
ProjectsGetPolicy'
{ _pgpXgafv = Nothing
, _pgpUploadProtocol = Nothing
, _pgpAccessToken = Nothing
, _pgpUploadType = Nothing
, _pgpName = pPgpName_
, _pgpCallback = Nothing
}
pgpXgafv :: Lens' ProjectsGetPolicy (Maybe Xgafv)
pgpXgafv = lens _pgpXgafv (\ s a -> s{_pgpXgafv = a})
pgpUploadProtocol :: Lens' ProjectsGetPolicy (Maybe Text)
pgpUploadProtocol
= lens _pgpUploadProtocol
(\ s a -> s{_pgpUploadProtocol = a})
pgpAccessToken :: Lens' ProjectsGetPolicy (Maybe Text)
pgpAccessToken
= lens _pgpAccessToken
(\ s a -> s{_pgpAccessToken = a})
pgpUploadType :: Lens' ProjectsGetPolicy (Maybe Text)
pgpUploadType
= lens _pgpUploadType
(\ s a -> s{_pgpUploadType = a})
pgpName :: Lens' ProjectsGetPolicy Text
pgpName = lens _pgpName (\ s a -> s{_pgpName = a})
pgpCallback :: Lens' ProjectsGetPolicy (Maybe Text)
pgpCallback
= lens _pgpCallback (\ s a -> s{_pgpCallback = a})
instance GoogleRequest ProjectsGetPolicy where
type Rs ProjectsGetPolicy = Policy
type Scopes ProjectsGetPolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsGetPolicy'{..}
= go _pgpName _pgpXgafv _pgpUploadProtocol
_pgpAccessToken
_pgpUploadType
_pgpCallback
(Just AltJSON)
binaryAuthorizationService
where go
= buildClient
(Proxy :: Proxy ProjectsGetPolicyResource)
mempty