{-# 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.TargetInstances.Get
(
TargetInstancesGetResource
, targetInstancesGet
, TargetInstancesGet
, tigProject
, tigTargetInstance
, tigZone
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type TargetInstancesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"targetInstances" :>
Capture "targetInstance" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] TargetInstance
data TargetInstancesGet = TargetInstancesGet'
{ _tigProject :: !Text
, _tigTargetInstance :: !Text
, _tigZone :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
targetInstancesGet
:: Text
-> Text
-> Text
-> TargetInstancesGet
targetInstancesGet pTigProject_ pTigTargetInstance_ pTigZone_ =
TargetInstancesGet'
{ _tigProject = pTigProject_
, _tigTargetInstance = pTigTargetInstance_
, _tigZone = pTigZone_
}
tigProject :: Lens' TargetInstancesGet Text
tigProject
= lens _tigProject (\ s a -> s{_tigProject = a})
tigTargetInstance :: Lens' TargetInstancesGet Text
tigTargetInstance
= lens _tigTargetInstance
(\ s a -> s{_tigTargetInstance = a})
tigZone :: Lens' TargetInstancesGet Text
tigZone = lens _tigZone (\ s a -> s{_tigZone = a})
instance GoogleRequest TargetInstancesGet where
type Rs TargetInstancesGet = TargetInstance
type Scopes TargetInstancesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient TargetInstancesGet'{..}
= go _tigProject _tigZone _tigTargetInstance
(Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy TargetInstancesGetResource)
mempty