{-# 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.DNS.Projects.Get
(
ProjectsGetResource
, projectsGet
, ProjectsGet
, pgProject
, pgClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type ProjectsGetResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Project
data ProjectsGet = ProjectsGet'
{ _pgProject :: !Text
, _pgClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGet
:: Text
-> ProjectsGet
projectsGet pPgProject_ =
ProjectsGet'
{ _pgProject = pPgProject_
, _pgClientOperationId = Nothing
}
pgProject :: Lens' ProjectsGet Text
pgProject
= lens _pgProject (\ s a -> s{_pgProject = a})
pgClientOperationId :: Lens' ProjectsGet (Maybe Text)
pgClientOperationId
= lens _pgClientOperationId
(\ s a -> s{_pgClientOperationId = a})
instance GoogleRequest ProjectsGet where
type Rs ProjectsGet = Project
type Scopes ProjectsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/ndev.clouddns.readonly",
"https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
requestClient ProjectsGet'{..}
= go _pgProject _pgClientOperationId (Just AltJSON)
dNSService
where go
= buildClient (Proxy :: Proxy ProjectsGetResource)
mempty