{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.APIGateway.GetDomainName
(
GetDomainName (..),
newGetDomainName,
getDomainName_domainName,
DomainName (..),
newDomainName,
domainName_regionalHostedZoneId,
domainName_certificateName,
domainName_ownershipVerificationCertificateArn,
domainName_regionalCertificateArn,
domainName_certificateArn,
domainName_distributionHostedZoneId,
domainName_securityPolicy,
domainName_domainName,
domainName_mutualTlsAuthentication,
domainName_regionalCertificateName,
domainName_regionalDomainName,
domainName_certificateUploadDate,
domainName_distributionDomainName,
domainName_domainNameStatusMessage,
domainName_endpointConfiguration,
domainName_domainNameStatus,
domainName_tags,
)
where
import Amazonka.APIGateway.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDomainName = GetDomainName'
{
GetDomainName -> Text
domainName :: Prelude.Text
}
deriving (GetDomainName -> GetDomainName -> Bool
(GetDomainName -> GetDomainName -> Bool)
-> (GetDomainName -> GetDomainName -> Bool) -> Eq GetDomainName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDomainName -> GetDomainName -> Bool
$c/= :: GetDomainName -> GetDomainName -> Bool
== :: GetDomainName -> GetDomainName -> Bool
$c== :: GetDomainName -> GetDomainName -> Bool
Prelude.Eq, ReadPrec [GetDomainName]
ReadPrec GetDomainName
Int -> ReadS GetDomainName
ReadS [GetDomainName]
(Int -> ReadS GetDomainName)
-> ReadS [GetDomainName]
-> ReadPrec GetDomainName
-> ReadPrec [GetDomainName]
-> Read GetDomainName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDomainName]
$creadListPrec :: ReadPrec [GetDomainName]
readPrec :: ReadPrec GetDomainName
$creadPrec :: ReadPrec GetDomainName
readList :: ReadS [GetDomainName]
$creadList :: ReadS [GetDomainName]
readsPrec :: Int -> ReadS GetDomainName
$creadsPrec :: Int -> ReadS GetDomainName
Prelude.Read, Int -> GetDomainName -> ShowS
[GetDomainName] -> ShowS
GetDomainName -> String
(Int -> GetDomainName -> ShowS)
-> (GetDomainName -> String)
-> ([GetDomainName] -> ShowS)
-> Show GetDomainName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDomainName] -> ShowS
$cshowList :: [GetDomainName] -> ShowS
show :: GetDomainName -> String
$cshow :: GetDomainName -> String
showsPrec :: Int -> GetDomainName -> ShowS
$cshowsPrec :: Int -> GetDomainName -> ShowS
Prelude.Show, (forall x. GetDomainName -> Rep GetDomainName x)
-> (forall x. Rep GetDomainName x -> GetDomainName)
-> Generic GetDomainName
forall x. Rep GetDomainName x -> GetDomainName
forall x. GetDomainName -> Rep GetDomainName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDomainName x -> GetDomainName
$cfrom :: forall x. GetDomainName -> Rep GetDomainName x
Prelude.Generic)
newGetDomainName ::
Prelude.Text ->
GetDomainName
newGetDomainName :: Text -> GetDomainName
newGetDomainName Text
pDomainName_ =
GetDomainName' :: Text -> GetDomainName
GetDomainName' {$sel:domainName:GetDomainName' :: Text
domainName = Text
pDomainName_}
getDomainName_domainName :: Lens.Lens' GetDomainName Prelude.Text
getDomainName_domainName :: (Text -> f Text) -> GetDomainName -> f GetDomainName
getDomainName_domainName = (GetDomainName -> Text)
-> (GetDomainName -> Text -> GetDomainName)
-> Lens GetDomainName GetDomainName Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainName' {Text
domainName :: Text
$sel:domainName:GetDomainName' :: GetDomainName -> Text
domainName} -> Text
domainName) (\s :: GetDomainName
s@GetDomainName' {} Text
a -> GetDomainName
s {$sel:domainName:GetDomainName' :: Text
domainName = Text
a} :: GetDomainName)
instance Core.AWSRequest GetDomainName where
type AWSResponse GetDomainName = DomainName
request :: GetDomainName -> Request GetDomainName
request = Service -> GetDomainName -> Request GetDomainName
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetDomainName
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomainName)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDomainName))
-> Logger
-> Service
-> Proxy GetDomainName
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomainName)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
(\Int
s ResponseHeaders
h Object
x -> Object -> Either String DomainName
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable GetDomainName
instance Prelude.NFData GetDomainName
instance Core.ToHeaders GetDomainName where
toHeaders :: GetDomainName -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDomainName -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Core.ToPath GetDomainName where
toPath :: GetDomainName -> ByteString
toPath GetDomainName' {Text
domainName :: Text
$sel:domainName:GetDomainName' :: GetDomainName -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/domainnames/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName]
instance Core.ToQuery GetDomainName where
toQuery :: GetDomainName -> QueryString
toQuery = QueryString -> GetDomainName -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty