{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.APIGateway.GetClientCertificate
(
getClientCertificate
, GetClientCertificate
, gccClientCertificateId
, clientCertificate
, ClientCertificate
, ccPemEncodedCertificate
, ccClientCertificateId
, ccCreatedDate
, ccExpirationDate
, ccDescription
) where
import Network.AWS.APIGateway.Types
import Network.AWS.APIGateway.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetClientCertificate = GetClientCertificate'
{ _gccClientCertificateId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getClientCertificate
:: Text
-> GetClientCertificate
getClientCertificate pClientCertificateId_ =
GetClientCertificate'
{ _gccClientCertificateId = pClientCertificateId_
}
gccClientCertificateId :: Lens' GetClientCertificate Text
gccClientCertificateId = lens _gccClientCertificateId (\ s a -> s{_gccClientCertificateId = a});
instance AWSRequest GetClientCertificate where
type Rs GetClientCertificate = ClientCertificate
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetClientCertificate
instance NFData GetClientCertificate
instance ToHeaders GetClientCertificate where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetClientCertificate where
toPath GetClientCertificate'{..}
= mconcat
["/clientcertificates/",
toBS _gccClientCertificateId]
instance ToQuery GetClientCertificate where
toQuery = const mempty