{-# 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.SecurityPolicies.Get
(
SecurityPoliciesGetResource
, securityPoliciesGet
, SecurityPoliciesGet
, secProject
, secSecurityPolicy
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SecurityPoliciesGetResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"securityPolicies" :>
Capture "securityPolicy" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] SecurityPolicy
data SecurityPoliciesGet = SecurityPoliciesGet'
{ _secProject :: !Text
, _secSecurityPolicy :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
securityPoliciesGet
:: Text
-> Text
-> SecurityPoliciesGet
securityPoliciesGet pSecProject_ pSecSecurityPolicy_ =
SecurityPoliciesGet'
{ _secProject = pSecProject_
, _secSecurityPolicy = pSecSecurityPolicy_
}
secProject :: Lens' SecurityPoliciesGet Text
secProject
= lens _secProject (\ s a -> s{_secProject = a})
secSecurityPolicy :: Lens' SecurityPoliciesGet Text
secSecurityPolicy
= lens _secSecurityPolicy
(\ s a -> s{_secSecurityPolicy = a})
instance GoogleRequest SecurityPoliciesGet where
type Rs SecurityPoliciesGet = SecurityPolicy
type Scopes SecurityPoliciesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly"]
requestClient SecurityPoliciesGet'{..}
= go _secProject _secSecurityPolicy (Just AltJSON)
computeService
where go
= buildClient
(Proxy :: Proxy SecurityPoliciesGetResource)
mempty