{-# 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.ApiGatewayV2.GetDomainName
(
GetDomainName (..),
newGetDomainName,
getDomainName_domainName,
GetDomainNameResponse (..),
newGetDomainNameResponse,
getDomainNameResponse_apiMappingSelectionExpression,
getDomainNameResponse_domainName,
getDomainNameResponse_domainNameConfigurations,
getDomainNameResponse_mutualTlsAuthentication,
getDomainNameResponse_tags,
getDomainNameResponse_httpStatus,
)
where
import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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' {$sel:domainName:GetDomainName' :: Text
domainName = Text
pDomainName_}
getDomainName_domainName :: Lens.Lens' GetDomainName Prelude.Text
getDomainName_domainName :: Lens' GetDomainName Text
getDomainName_domainName = 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 =
GetDomainNameResponse
request :: (Service -> Service) -> GetDomainName -> Request GetDomainName
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetDomainName
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDomainName)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [DomainNameConfiguration]
-> Maybe MutualTlsAuthentication
-> Maybe (HashMap Text Text)
-> Int
-> GetDomainNameResponse
GetDomainNameResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"apiMappingSelectionExpression")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"domainName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"domainNameConfigurations"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"mutualTlsAuthentication")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetDomainName where
hashWithSalt :: Int -> GetDomainName -> Int
hashWithSalt Int
_salt GetDomainName' {Text
domainName :: Text
$sel:domainName:GetDomainName' :: GetDomainName -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance Prelude.NFData GetDomainName where
rnf :: GetDomainName -> ()
rnf GetDomainName' {Text
domainName :: Text
$sel:domainName:GetDomainName' :: GetDomainName -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
instance Data.ToHeaders GetDomainName where
toHeaders :: GetDomainName -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetDomainName where
toPath :: GetDomainName -> ByteString
toPath GetDomainName' {Text
domainName :: Text
$sel:domainName:GetDomainName' :: GetDomainName -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/v2/domainnames/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
domainName]
instance Data.ToQuery GetDomainName where
toQuery :: GetDomainName -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetDomainNameResponse = GetDomainNameResponse'
{
GetDomainNameResponse -> Maybe Text
apiMappingSelectionExpression :: Prelude.Maybe Prelude.Text,
GetDomainNameResponse -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
GetDomainNameResponse -> Maybe [DomainNameConfiguration]
domainNameConfigurations :: Prelude.Maybe [DomainNameConfiguration],
GetDomainNameResponse -> Maybe MutualTlsAuthentication
mutualTlsAuthentication :: Prelude.Maybe MutualTlsAuthentication,
GetDomainNameResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
GetDomainNameResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDomainNameResponse -> GetDomainNameResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDomainNameResponse -> GetDomainNameResponse -> Bool
$c/= :: GetDomainNameResponse -> GetDomainNameResponse -> Bool
== :: GetDomainNameResponse -> GetDomainNameResponse -> Bool
$c== :: GetDomainNameResponse -> GetDomainNameResponse -> Bool
Prelude.Eq, ReadPrec [GetDomainNameResponse]
ReadPrec GetDomainNameResponse
Int -> ReadS GetDomainNameResponse
ReadS [GetDomainNameResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDomainNameResponse]
$creadListPrec :: ReadPrec [GetDomainNameResponse]
readPrec :: ReadPrec GetDomainNameResponse
$creadPrec :: ReadPrec GetDomainNameResponse
readList :: ReadS [GetDomainNameResponse]
$creadList :: ReadS [GetDomainNameResponse]
readsPrec :: Int -> ReadS GetDomainNameResponse
$creadsPrec :: Int -> ReadS GetDomainNameResponse
Prelude.Read, Int -> GetDomainNameResponse -> ShowS
[GetDomainNameResponse] -> ShowS
GetDomainNameResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDomainNameResponse] -> ShowS
$cshowList :: [GetDomainNameResponse] -> ShowS
show :: GetDomainNameResponse -> String
$cshow :: GetDomainNameResponse -> String
showsPrec :: Int -> GetDomainNameResponse -> ShowS
$cshowsPrec :: Int -> GetDomainNameResponse -> ShowS
Prelude.Show, forall x. Rep GetDomainNameResponse x -> GetDomainNameResponse
forall x. GetDomainNameResponse -> Rep GetDomainNameResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDomainNameResponse x -> GetDomainNameResponse
$cfrom :: forall x. GetDomainNameResponse -> Rep GetDomainNameResponse x
Prelude.Generic)
newGetDomainNameResponse ::
Prelude.Int ->
GetDomainNameResponse
newGetDomainNameResponse :: Int -> GetDomainNameResponse
newGetDomainNameResponse Int
pHttpStatus_ =
GetDomainNameResponse'
{ $sel:apiMappingSelectionExpression:GetDomainNameResponse' :: Maybe Text
apiMappingSelectionExpression =
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:GetDomainNameResponse' :: Maybe Text
domainName = forall a. Maybe a
Prelude.Nothing,
$sel:domainNameConfigurations:GetDomainNameResponse' :: Maybe [DomainNameConfiguration]
domainNameConfigurations = forall a. Maybe a
Prelude.Nothing,
$sel:mutualTlsAuthentication:GetDomainNameResponse' :: Maybe MutualTlsAuthentication
mutualTlsAuthentication = forall a. Maybe a
Prelude.Nothing,
$sel:tags:GetDomainNameResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDomainNameResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDomainNameResponse_apiMappingSelectionExpression :: Lens.Lens' GetDomainNameResponse (Prelude.Maybe Prelude.Text)
getDomainNameResponse_apiMappingSelectionExpression :: Lens' GetDomainNameResponse (Maybe Text)
getDomainNameResponse_apiMappingSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainNameResponse' {Maybe Text
apiMappingSelectionExpression :: Maybe Text
$sel:apiMappingSelectionExpression:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe Text
apiMappingSelectionExpression} -> Maybe Text
apiMappingSelectionExpression) (\s :: GetDomainNameResponse
s@GetDomainNameResponse' {} Maybe Text
a -> GetDomainNameResponse
s {$sel:apiMappingSelectionExpression:GetDomainNameResponse' :: Maybe Text
apiMappingSelectionExpression = Maybe Text
a} :: GetDomainNameResponse)
getDomainNameResponse_domainName :: Lens.Lens' GetDomainNameResponse (Prelude.Maybe Prelude.Text)
getDomainNameResponse_domainName :: Lens' GetDomainNameResponse (Maybe Text)
getDomainNameResponse_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainNameResponse' {Maybe Text
domainName :: Maybe Text
$sel:domainName:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: GetDomainNameResponse
s@GetDomainNameResponse' {} Maybe Text
a -> GetDomainNameResponse
s {$sel:domainName:GetDomainNameResponse' :: Maybe Text
domainName = Maybe Text
a} :: GetDomainNameResponse)
getDomainNameResponse_domainNameConfigurations :: Lens.Lens' GetDomainNameResponse (Prelude.Maybe [DomainNameConfiguration])
getDomainNameResponse_domainNameConfigurations :: Lens' GetDomainNameResponse (Maybe [DomainNameConfiguration])
getDomainNameResponse_domainNameConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainNameResponse' {Maybe [DomainNameConfiguration]
domainNameConfigurations :: Maybe [DomainNameConfiguration]
$sel:domainNameConfigurations:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe [DomainNameConfiguration]
domainNameConfigurations} -> Maybe [DomainNameConfiguration]
domainNameConfigurations) (\s :: GetDomainNameResponse
s@GetDomainNameResponse' {} Maybe [DomainNameConfiguration]
a -> GetDomainNameResponse
s {$sel:domainNameConfigurations:GetDomainNameResponse' :: Maybe [DomainNameConfiguration]
domainNameConfigurations = Maybe [DomainNameConfiguration]
a} :: GetDomainNameResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getDomainNameResponse_mutualTlsAuthentication :: Lens.Lens' GetDomainNameResponse (Prelude.Maybe MutualTlsAuthentication)
getDomainNameResponse_mutualTlsAuthentication :: Lens' GetDomainNameResponse (Maybe MutualTlsAuthentication)
getDomainNameResponse_mutualTlsAuthentication = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainNameResponse' {Maybe MutualTlsAuthentication
mutualTlsAuthentication :: Maybe MutualTlsAuthentication
$sel:mutualTlsAuthentication:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe MutualTlsAuthentication
mutualTlsAuthentication} -> Maybe MutualTlsAuthentication
mutualTlsAuthentication) (\s :: GetDomainNameResponse
s@GetDomainNameResponse' {} Maybe MutualTlsAuthentication
a -> GetDomainNameResponse
s {$sel:mutualTlsAuthentication:GetDomainNameResponse' :: Maybe MutualTlsAuthentication
mutualTlsAuthentication = Maybe MutualTlsAuthentication
a} :: GetDomainNameResponse)
getDomainNameResponse_tags :: Lens.Lens' GetDomainNameResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDomainNameResponse_tags :: Lens' GetDomainNameResponse (Maybe (HashMap Text Text))
getDomainNameResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainNameResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetDomainNameResponse
s@GetDomainNameResponse' {} Maybe (HashMap Text Text)
a -> GetDomainNameResponse
s {$sel:tags:GetDomainNameResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetDomainNameResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getDomainNameResponse_httpStatus :: Lens.Lens' GetDomainNameResponse Prelude.Int
getDomainNameResponse_httpStatus :: Lens' GetDomainNameResponse Int
getDomainNameResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDomainNameResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDomainNameResponse' :: GetDomainNameResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDomainNameResponse
s@GetDomainNameResponse' {} Int
a -> GetDomainNameResponse
s {$sel:httpStatus:GetDomainNameResponse' :: Int
httpStatus = Int
a} :: GetDomainNameResponse)
instance Prelude.NFData GetDomainNameResponse where
rnf :: GetDomainNameResponse -> ()
rnf GetDomainNameResponse' {Int
Maybe [DomainNameConfiguration]
Maybe Text
Maybe (HashMap Text Text)
Maybe MutualTlsAuthentication
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
mutualTlsAuthentication :: Maybe MutualTlsAuthentication
domainNameConfigurations :: Maybe [DomainNameConfiguration]
domainName :: Maybe Text
apiMappingSelectionExpression :: Maybe Text
$sel:httpStatus:GetDomainNameResponse' :: GetDomainNameResponse -> Int
$sel:tags:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe (HashMap Text Text)
$sel:mutualTlsAuthentication:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe MutualTlsAuthentication
$sel:domainNameConfigurations:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe [DomainNameConfiguration]
$sel:domainName:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe Text
$sel:apiMappingSelectionExpression:GetDomainNameResponse' :: GetDomainNameResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
apiMappingSelectionExpression
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [DomainNameConfiguration]
domainNameConfigurations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MutualTlsAuthentication
mutualTlsAuthentication
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus