{-# 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.BigQuery.Projects.GetServiceAccount
(
ProjectsGetServiceAccountResource
, projectsGetServiceAccount
, ProjectsGetServiceAccount
, pgsaProjectId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type ProjectsGetServiceAccountResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"serviceAccount" :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetServiceAccountResponse
newtype ProjectsGetServiceAccount = ProjectsGetServiceAccount'
{ _pgsaProjectId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGetServiceAccount
:: Text
-> ProjectsGetServiceAccount
projectsGetServiceAccount pPgsaProjectId_ =
ProjectsGetServiceAccount'
{ _pgsaProjectId = pPgsaProjectId_
}
pgsaProjectId :: Lens' ProjectsGetServiceAccount Text
pgsaProjectId
= lens _pgsaProjectId
(\ s a -> s{_pgsaProjectId = a})
instance GoogleRequest ProjectsGetServiceAccount
where
type Rs ProjectsGetServiceAccount =
GetServiceAccountResponse
type Scopes ProjectsGetServiceAccount =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient ProjectsGetServiceAccount'{..}
= go _pgsaProjectId (Just AltJSON) bigQueryService
where go
= buildClient
(Proxy :: Proxy ProjectsGetServiceAccountResource)
mempty