{-# 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.CloudUserAccounts.GlobalAccountsOperations.Get
(
GlobalAccountsOperationsGetResource
, globalAccountsOperationsGet
, GlobalAccountsOperationsGet
, gaogProject
, gaogOperation
) where
import Network.Google.Prelude
import Network.Google.UserAccounts.Types
type GlobalAccountsOperationsGetResource =
"clouduseraccounts" :>
"beta" :>
"projects" :>
Capture "project" Text :>
"global" :>
"operations" :>
Capture "operation" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Operation
-- | Retrieves the specified operation resource.
--
-- /See:/ 'globalAccountsOperationsGet' smart constructor.
data GlobalAccountsOperationsGet = GlobalAccountsOperationsGet'
{ _gaogProject :: !Text
, _gaogOperation :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'GlobalAccountsOperationsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gaogProject'
--
-- * 'gaogOperation'
globalAccountsOperationsGet
:: Text -- ^ 'gaogProject'
-> Text -- ^ 'gaogOperation'
-> GlobalAccountsOperationsGet
globalAccountsOperationsGet pGaogProject_ pGaogOperation_ =
GlobalAccountsOperationsGet'
{ _gaogProject = pGaogProject_
, _gaogOperation = pGaogOperation_
}
-- | Project ID for this request.
gaogProject :: Lens' GlobalAccountsOperationsGet Text
gaogProject
= lens _gaogProject (\ s a -> s{_gaogProject = a})
-- | Name of the Operations resource to return.
gaogOperation :: Lens' GlobalAccountsOperationsGet Text
gaogOperation
= lens _gaogOperation
(\ s a -> s{_gaogOperation = a})
instance GoogleRequest GlobalAccountsOperationsGet
where
type Rs GlobalAccountsOperationsGet = Operation
type Scopes GlobalAccountsOperationsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/cloud.useraccounts",
"https://www.googleapis.com/auth/cloud.useraccounts.readonly"]
requestClient GlobalAccountsOperationsGet'{..}
= go _gaogProject _gaogOperation (Just AltJSON)
userAccountsService
where go
= buildClient
(Proxy :: Proxy GlobalAccountsOperationsGetResource)
mempty