{-# 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.Instances.Get
(
InstancesGetResource
, instancesGet
, InstancesGet
, igProject
, igZone
, igInstance
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstancesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instances" :>
Capture "instance" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Instance
data InstancesGet = InstancesGet'
{ _igProject :: !Text
, _igZone :: !Text
, _igInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesGet
:: Text
-> Text
-> Text
-> InstancesGet
instancesGet pIgProject_ pIgZone_ pIgInstance_ =
InstancesGet'
{ _igProject = pIgProject_
, _igZone = pIgZone_
, _igInstance = pIgInstance_
}
igProject :: Lens' InstancesGet Text
igProject
= lens _igProject (\ s a -> s{_igProject = a})
igZone :: Lens' InstancesGet Text
igZone = lens _igZone (\ s a -> s{_igZone = a})
igInstance :: Lens' InstancesGet Text
igInstance
= lens _igInstance (\ s a -> s{_igInstance = a})
instance GoogleRequest InstancesGet where
type Rs InstancesGet = Instance
type Scopes InstancesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient InstancesGet'{..}
= go _igProject _igZone _igInstance (Just AltJSON)
computeService
where go
= buildClient (Proxy :: Proxy InstancesGetResource)
mempty