{-# 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.SQL.BackupRuns.Get
(
BackupRunsGetResource
, backupRunsGet
, BackupRunsGet
, brgProject
, brgId
, brgInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type BackupRunsGetResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"backupRuns" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] BackupRun
data BackupRunsGet = BackupRunsGet'
{ _brgProject :: !Text
, _brgId :: !(Textual Int64)
, _brgInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
backupRunsGet
:: Text
-> Int64
-> Text
-> BackupRunsGet
backupRunsGet pBrgProject_ pBrgId_ pBrgInstance_ =
BackupRunsGet'
{ _brgProject = pBrgProject_
, _brgId = _Coerce # pBrgId_
, _brgInstance = pBrgInstance_
}
brgProject :: Lens' BackupRunsGet Text
brgProject
= lens _brgProject (\ s a -> s{_brgProject = a})
brgId :: Lens' BackupRunsGet Int64
brgId
= lens _brgId (\ s a -> s{_brgId = a}) . _Coerce
brgInstance :: Lens' BackupRunsGet Text
brgInstance
= lens _brgInstance (\ s a -> s{_brgInstance = a})
instance GoogleRequest BackupRunsGet where
type Rs BackupRunsGet = BackupRun
type Scopes BackupRunsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient BackupRunsGet'{..}
= go _brgProject _brgInstance _brgId (Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy BackupRunsGetResource)
mempty