{-# 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.Compute.Snapshots.Get
(
SnapshotsGetResource
, snapshotsGet
, SnapshotsGet
, sggSnapshot
, sggProject
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SnapshotsGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"snapshots" :>
Capture "snapshot" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Snapshot
data SnapshotsGet = SnapshotsGet'
{ _sggSnapshot :: !Text
, _sggProject :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
snapshotsGet
:: Text
-> Text
-> SnapshotsGet
snapshotsGet pSggSnapshot_ pSggProject_ =
SnapshotsGet'
{ _sggSnapshot = pSggSnapshot_
, _sggProject = pSggProject_
}
sggSnapshot :: Lens' SnapshotsGet Text
sggSnapshot
= lens _sggSnapshot (\ s a -> s{_sggSnapshot = a})
sggProject :: Lens' SnapshotsGet Text
sggProject
= lens _sggProject (\ s a -> s{_sggProject = a})
instance GoogleRequest SnapshotsGet where
type Rs SnapshotsGet = Snapshot
type Scopes SnapshotsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient SnapshotsGet'{..}
= go _sggProject _sggSnapshot (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy SnapshotsGetResource)
mempty