{-# 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.DNSKeys.Get
(
DNSKeysGetResource
, dnsKeysGet
, DNSKeysGet
, dkgProject
, dkgDigestType
, dkgDNSKeyId
, dkgManagedZone
, dkgClientOperationId
) where
import Network.Google.DNS.Types
import Network.Google.Prelude
type DNSKeysGetResource =
"dns" :>
"v2beta1" :>
"projects" :>
Capture "project" Text :>
"managedZones" :>
Capture "managedZone" Text :>
"dnsKeys" :>
Capture "dnsKeyId" Text :>
QueryParam "digestType" Text :>
QueryParam "clientOperationId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DNSKey
data DNSKeysGet = DNSKeysGet'
{ _dkgProject :: !Text
, _dkgDigestType :: !(Maybe Text)
, _dkgDNSKeyId :: !Text
, _dkgManagedZone :: !Text
, _dkgClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dnsKeysGet
:: Text
-> Text
-> Text
-> DNSKeysGet
dnsKeysGet pDkgProject_ pDkgDNSKeyId_ pDkgManagedZone_ =
DNSKeysGet'
{ _dkgProject = pDkgProject_
, _dkgDigestType = Nothing
, _dkgDNSKeyId = pDkgDNSKeyId_
, _dkgManagedZone = pDkgManagedZone_
, _dkgClientOperationId = Nothing
}
dkgProject :: Lens' DNSKeysGet Text
dkgProject
= lens _dkgProject (\ s a -> s{_dkgProject = a})
dkgDigestType :: Lens' DNSKeysGet (Maybe Text)
dkgDigestType
= lens _dkgDigestType
(\ s a -> s{_dkgDigestType = a})
dkgDNSKeyId :: Lens' DNSKeysGet Text
dkgDNSKeyId
= lens _dkgDNSKeyId (\ s a -> s{_dkgDNSKeyId = a})
dkgManagedZone :: Lens' DNSKeysGet Text
dkgManagedZone
= lens _dkgManagedZone
(\ s a -> s{_dkgManagedZone = a})
dkgClientOperationId :: Lens' DNSKeysGet (Maybe Text)
dkgClientOperationId
= lens _dkgClientOperationId
(\ s a -> s{_dkgClientOperationId = a})
instance GoogleRequest DNSKeysGet where
type Rs DNSKeysGet = DNSKey
type Scopes DNSKeysGet =
'["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 DNSKeysGet'{..}
= go _dkgProject _dkgManagedZone _dkgDNSKeyId
_dkgDigestType
_dkgClientOperationId
(Just AltJSON)
dNSService
where go
= buildClient (Proxy :: Proxy DNSKeysGetResource)
mempty