{-# 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.CloudSearch.DescribeDomainEndpointOptions
(
DescribeDomainEndpointOptions (..),
newDescribeDomainEndpointOptions,
describeDomainEndpointOptions_deployed,
describeDomainEndpointOptions_domainName,
DescribeDomainEndpointOptionsResponse (..),
newDescribeDomainEndpointOptionsResponse,
describeDomainEndpointOptionsResponse_domainEndpointOptions,
describeDomainEndpointOptionsResponse_httpStatus,
)
where
import Amazonka.CloudSearch.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 DescribeDomainEndpointOptions = DescribeDomainEndpointOptions'
{
DescribeDomainEndpointOptions -> Maybe Bool
deployed :: Prelude.Maybe Prelude.Bool,
DescribeDomainEndpointOptions -> Text
domainName :: Prelude.Text
}
deriving (DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool
(DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool)
-> (DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool)
-> Eq DescribeDomainEndpointOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool
$c/= :: DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool
== :: DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool
$c== :: DescribeDomainEndpointOptions
-> DescribeDomainEndpointOptions -> Bool
Prelude.Eq, ReadPrec [DescribeDomainEndpointOptions]
ReadPrec DescribeDomainEndpointOptions
Int -> ReadS DescribeDomainEndpointOptions
ReadS [DescribeDomainEndpointOptions]
(Int -> ReadS DescribeDomainEndpointOptions)
-> ReadS [DescribeDomainEndpointOptions]
-> ReadPrec DescribeDomainEndpointOptions
-> ReadPrec [DescribeDomainEndpointOptions]
-> Read DescribeDomainEndpointOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainEndpointOptions]
$creadListPrec :: ReadPrec [DescribeDomainEndpointOptions]
readPrec :: ReadPrec DescribeDomainEndpointOptions
$creadPrec :: ReadPrec DescribeDomainEndpointOptions
readList :: ReadS [DescribeDomainEndpointOptions]
$creadList :: ReadS [DescribeDomainEndpointOptions]
readsPrec :: Int -> ReadS DescribeDomainEndpointOptions
$creadsPrec :: Int -> ReadS DescribeDomainEndpointOptions
Prelude.Read, Int -> DescribeDomainEndpointOptions -> ShowS
[DescribeDomainEndpointOptions] -> ShowS
DescribeDomainEndpointOptions -> String
(Int -> DescribeDomainEndpointOptions -> ShowS)
-> (DescribeDomainEndpointOptions -> String)
-> ([DescribeDomainEndpointOptions] -> ShowS)
-> Show DescribeDomainEndpointOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainEndpointOptions] -> ShowS
$cshowList :: [DescribeDomainEndpointOptions] -> ShowS
show :: DescribeDomainEndpointOptions -> String
$cshow :: DescribeDomainEndpointOptions -> String
showsPrec :: Int -> DescribeDomainEndpointOptions -> ShowS
$cshowsPrec :: Int -> DescribeDomainEndpointOptions -> ShowS
Prelude.Show, (forall x.
DescribeDomainEndpointOptions
-> Rep DescribeDomainEndpointOptions x)
-> (forall x.
Rep DescribeDomainEndpointOptions x
-> DescribeDomainEndpointOptions)
-> Generic DescribeDomainEndpointOptions
forall x.
Rep DescribeDomainEndpointOptions x
-> DescribeDomainEndpointOptions
forall x.
DescribeDomainEndpointOptions
-> Rep DescribeDomainEndpointOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDomainEndpointOptions x
-> DescribeDomainEndpointOptions
$cfrom :: forall x.
DescribeDomainEndpointOptions
-> Rep DescribeDomainEndpointOptions x
Prelude.Generic)
newDescribeDomainEndpointOptions ::
Prelude.Text ->
DescribeDomainEndpointOptions
newDescribeDomainEndpointOptions :: Text -> DescribeDomainEndpointOptions
newDescribeDomainEndpointOptions Text
pDomainName_ =
DescribeDomainEndpointOptions' :: Maybe Bool -> Text -> DescribeDomainEndpointOptions
DescribeDomainEndpointOptions'
{ $sel:deployed:DescribeDomainEndpointOptions' :: Maybe Bool
deployed =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:DescribeDomainEndpointOptions' :: Text
domainName = Text
pDomainName_
}
describeDomainEndpointOptions_deployed :: Lens.Lens' DescribeDomainEndpointOptions (Prelude.Maybe Prelude.Bool)
describeDomainEndpointOptions_deployed :: (Maybe Bool -> f (Maybe Bool))
-> DescribeDomainEndpointOptions -> f DescribeDomainEndpointOptions
describeDomainEndpointOptions_deployed = (DescribeDomainEndpointOptions -> Maybe Bool)
-> (DescribeDomainEndpointOptions
-> Maybe Bool -> DescribeDomainEndpointOptions)
-> Lens
DescribeDomainEndpointOptions
DescribeDomainEndpointOptions
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainEndpointOptions' {Maybe Bool
deployed :: Maybe Bool
$sel:deployed:DescribeDomainEndpointOptions' :: DescribeDomainEndpointOptions -> Maybe Bool
deployed} -> Maybe Bool
deployed) (\s :: DescribeDomainEndpointOptions
s@DescribeDomainEndpointOptions' {} Maybe Bool
a -> DescribeDomainEndpointOptions
s {$sel:deployed:DescribeDomainEndpointOptions' :: Maybe Bool
deployed = Maybe Bool
a} :: DescribeDomainEndpointOptions)
describeDomainEndpointOptions_domainName :: Lens.Lens' DescribeDomainEndpointOptions Prelude.Text
describeDomainEndpointOptions_domainName :: (Text -> f Text)
-> DescribeDomainEndpointOptions -> f DescribeDomainEndpointOptions
describeDomainEndpointOptions_domainName = (DescribeDomainEndpointOptions -> Text)
-> (DescribeDomainEndpointOptions
-> Text -> DescribeDomainEndpointOptions)
-> Lens
DescribeDomainEndpointOptions
DescribeDomainEndpointOptions
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainEndpointOptions' {Text
domainName :: Text
$sel:domainName:DescribeDomainEndpointOptions' :: DescribeDomainEndpointOptions -> Text
domainName} -> Text
domainName) (\s :: DescribeDomainEndpointOptions
s@DescribeDomainEndpointOptions' {} Text
a -> DescribeDomainEndpointOptions
s {$sel:domainName:DescribeDomainEndpointOptions' :: Text
domainName = Text
a} :: DescribeDomainEndpointOptions)
instance
Core.AWSRequest
DescribeDomainEndpointOptions
where
type
AWSResponse DescribeDomainEndpointOptions =
DescribeDomainEndpointOptionsResponse
request :: DescribeDomainEndpointOptions
-> Request DescribeDomainEndpointOptions
request = Service
-> DescribeDomainEndpointOptions
-> Request DescribeDomainEndpointOptions
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeDomainEndpointOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeDomainEndpointOptions)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeDomainEndpointOptions))
-> Logger
-> Service
-> Proxy DescribeDomainEndpointOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeDomainEndpointOptions)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeDomainEndpointOptionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DomainEndpointOptionsStatus
-> Int -> DescribeDomainEndpointOptionsResponse
DescribeDomainEndpointOptionsResponse'
(Maybe DomainEndpointOptionsStatus
-> Int -> DescribeDomainEndpointOptionsResponse)
-> Either String (Maybe DomainEndpointOptionsStatus)
-> Either String (Int -> DescribeDomainEndpointOptionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe DomainEndpointOptionsStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DomainEndpointOptions")
Either String (Int -> DescribeDomainEndpointOptionsResponse)
-> Either String Int
-> Either String DescribeDomainEndpointOptionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DescribeDomainEndpointOptions
instance Prelude.NFData DescribeDomainEndpointOptions
instance Core.ToHeaders DescribeDomainEndpointOptions where
toHeaders :: DescribeDomainEndpointOptions -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeDomainEndpointOptions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeDomainEndpointOptions where
toPath :: DescribeDomainEndpointOptions -> ByteString
toPath = ByteString -> DescribeDomainEndpointOptions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeDomainEndpointOptions where
toQuery :: DescribeDomainEndpointOptions -> QueryString
toQuery DescribeDomainEndpointOptions' {Maybe Bool
Text
domainName :: Text
deployed :: Maybe Bool
$sel:domainName:DescribeDomainEndpointOptions' :: DescribeDomainEndpointOptions -> Text
$sel:deployed:DescribeDomainEndpointOptions' :: DescribeDomainEndpointOptions -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeDomainEndpointOptions" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2013-01-01" :: Prelude.ByteString),
ByteString
"Deployed" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
deployed,
ByteString
"DomainName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domainName
]
data DescribeDomainEndpointOptionsResponse = DescribeDomainEndpointOptionsResponse'
{
DescribeDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus
domainEndpointOptions :: Prelude.Maybe DomainEndpointOptionsStatus,
DescribeDomainEndpointOptionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool
(DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool)
-> (DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool)
-> Eq DescribeDomainEndpointOptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool
$c/= :: DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool
== :: DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool
$c== :: DescribeDomainEndpointOptionsResponse
-> DescribeDomainEndpointOptionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDomainEndpointOptionsResponse]
ReadPrec DescribeDomainEndpointOptionsResponse
Int -> ReadS DescribeDomainEndpointOptionsResponse
ReadS [DescribeDomainEndpointOptionsResponse]
(Int -> ReadS DescribeDomainEndpointOptionsResponse)
-> ReadS [DescribeDomainEndpointOptionsResponse]
-> ReadPrec DescribeDomainEndpointOptionsResponse
-> ReadPrec [DescribeDomainEndpointOptionsResponse]
-> Read DescribeDomainEndpointOptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDomainEndpointOptionsResponse]
$creadListPrec :: ReadPrec [DescribeDomainEndpointOptionsResponse]
readPrec :: ReadPrec DescribeDomainEndpointOptionsResponse
$creadPrec :: ReadPrec DescribeDomainEndpointOptionsResponse
readList :: ReadS [DescribeDomainEndpointOptionsResponse]
$creadList :: ReadS [DescribeDomainEndpointOptionsResponse]
readsPrec :: Int -> ReadS DescribeDomainEndpointOptionsResponse
$creadsPrec :: Int -> ReadS DescribeDomainEndpointOptionsResponse
Prelude.Read, Int -> DescribeDomainEndpointOptionsResponse -> ShowS
[DescribeDomainEndpointOptionsResponse] -> ShowS
DescribeDomainEndpointOptionsResponse -> String
(Int -> DescribeDomainEndpointOptionsResponse -> ShowS)
-> (DescribeDomainEndpointOptionsResponse -> String)
-> ([DescribeDomainEndpointOptionsResponse] -> ShowS)
-> Show DescribeDomainEndpointOptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDomainEndpointOptionsResponse] -> ShowS
$cshowList :: [DescribeDomainEndpointOptionsResponse] -> ShowS
show :: DescribeDomainEndpointOptionsResponse -> String
$cshow :: DescribeDomainEndpointOptionsResponse -> String
showsPrec :: Int -> DescribeDomainEndpointOptionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDomainEndpointOptionsResponse -> ShowS
Prelude.Show, (forall x.
DescribeDomainEndpointOptionsResponse
-> Rep DescribeDomainEndpointOptionsResponse x)
-> (forall x.
Rep DescribeDomainEndpointOptionsResponse x
-> DescribeDomainEndpointOptionsResponse)
-> Generic DescribeDomainEndpointOptionsResponse
forall x.
Rep DescribeDomainEndpointOptionsResponse x
-> DescribeDomainEndpointOptionsResponse
forall x.
DescribeDomainEndpointOptionsResponse
-> Rep DescribeDomainEndpointOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDomainEndpointOptionsResponse x
-> DescribeDomainEndpointOptionsResponse
$cfrom :: forall x.
DescribeDomainEndpointOptionsResponse
-> Rep DescribeDomainEndpointOptionsResponse x
Prelude.Generic)
newDescribeDomainEndpointOptionsResponse ::
Prelude.Int ->
DescribeDomainEndpointOptionsResponse
newDescribeDomainEndpointOptionsResponse :: Int -> DescribeDomainEndpointOptionsResponse
newDescribeDomainEndpointOptionsResponse Int
pHttpStatus_ =
DescribeDomainEndpointOptionsResponse' :: Maybe DomainEndpointOptionsStatus
-> Int -> DescribeDomainEndpointOptionsResponse
DescribeDomainEndpointOptionsResponse'
{ $sel:domainEndpointOptions:DescribeDomainEndpointOptionsResponse' :: Maybe DomainEndpointOptionsStatus
domainEndpointOptions =
Maybe DomainEndpointOptionsStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeDomainEndpointOptionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeDomainEndpointOptionsResponse_domainEndpointOptions :: Lens.Lens' DescribeDomainEndpointOptionsResponse (Prelude.Maybe DomainEndpointOptionsStatus)
describeDomainEndpointOptionsResponse_domainEndpointOptions :: (Maybe DomainEndpointOptionsStatus
-> f (Maybe DomainEndpointOptionsStatus))
-> DescribeDomainEndpointOptionsResponse
-> f DescribeDomainEndpointOptionsResponse
describeDomainEndpointOptionsResponse_domainEndpointOptions = (DescribeDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus)
-> (DescribeDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus
-> DescribeDomainEndpointOptionsResponse)
-> Lens
DescribeDomainEndpointOptionsResponse
DescribeDomainEndpointOptionsResponse
(Maybe DomainEndpointOptionsStatus)
(Maybe DomainEndpointOptionsStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainEndpointOptionsResponse' {Maybe DomainEndpointOptionsStatus
domainEndpointOptions :: Maybe DomainEndpointOptionsStatus
$sel:domainEndpointOptions:DescribeDomainEndpointOptionsResponse' :: DescribeDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus
domainEndpointOptions} -> Maybe DomainEndpointOptionsStatus
domainEndpointOptions) (\s :: DescribeDomainEndpointOptionsResponse
s@DescribeDomainEndpointOptionsResponse' {} Maybe DomainEndpointOptionsStatus
a -> DescribeDomainEndpointOptionsResponse
s {$sel:domainEndpointOptions:DescribeDomainEndpointOptionsResponse' :: Maybe DomainEndpointOptionsStatus
domainEndpointOptions = Maybe DomainEndpointOptionsStatus
a} :: DescribeDomainEndpointOptionsResponse)
describeDomainEndpointOptionsResponse_httpStatus :: Lens.Lens' DescribeDomainEndpointOptionsResponse Prelude.Int
describeDomainEndpointOptionsResponse_httpStatus :: (Int -> f Int)
-> DescribeDomainEndpointOptionsResponse
-> f DescribeDomainEndpointOptionsResponse
describeDomainEndpointOptionsResponse_httpStatus = (DescribeDomainEndpointOptionsResponse -> Int)
-> (DescribeDomainEndpointOptionsResponse
-> Int -> DescribeDomainEndpointOptionsResponse)
-> Lens
DescribeDomainEndpointOptionsResponse
DescribeDomainEndpointOptionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDomainEndpointOptionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDomainEndpointOptionsResponse' :: DescribeDomainEndpointOptionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDomainEndpointOptionsResponse
s@DescribeDomainEndpointOptionsResponse' {} Int
a -> DescribeDomainEndpointOptionsResponse
s {$sel:httpStatus:DescribeDomainEndpointOptionsResponse' :: Int
httpStatus = Int
a} :: DescribeDomainEndpointOptionsResponse)
instance
Prelude.NFData
DescribeDomainEndpointOptionsResponse