{-# 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.UpdateDomainEndpointOptions
(
UpdateDomainEndpointOptions (..),
newUpdateDomainEndpointOptions,
updateDomainEndpointOptions_domainName,
updateDomainEndpointOptions_domainEndpointOptions,
UpdateDomainEndpointOptionsResponse (..),
newUpdateDomainEndpointOptionsResponse,
updateDomainEndpointOptionsResponse_domainEndpointOptions,
updateDomainEndpointOptionsResponse_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 UpdateDomainEndpointOptions = UpdateDomainEndpointOptions'
{
UpdateDomainEndpointOptions -> Text
domainName :: Prelude.Text,
UpdateDomainEndpointOptions -> DomainEndpointOptions
domainEndpointOptions :: DomainEndpointOptions
}
deriving (UpdateDomainEndpointOptions -> UpdateDomainEndpointOptions -> Bool
(UpdateDomainEndpointOptions
-> UpdateDomainEndpointOptions -> Bool)
-> (UpdateDomainEndpointOptions
-> UpdateDomainEndpointOptions -> Bool)
-> Eq UpdateDomainEndpointOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainEndpointOptions -> UpdateDomainEndpointOptions -> Bool
$c/= :: UpdateDomainEndpointOptions -> UpdateDomainEndpointOptions -> Bool
== :: UpdateDomainEndpointOptions -> UpdateDomainEndpointOptions -> Bool
$c== :: UpdateDomainEndpointOptions -> UpdateDomainEndpointOptions -> Bool
Prelude.Eq, ReadPrec [UpdateDomainEndpointOptions]
ReadPrec UpdateDomainEndpointOptions
Int -> ReadS UpdateDomainEndpointOptions
ReadS [UpdateDomainEndpointOptions]
(Int -> ReadS UpdateDomainEndpointOptions)
-> ReadS [UpdateDomainEndpointOptions]
-> ReadPrec UpdateDomainEndpointOptions
-> ReadPrec [UpdateDomainEndpointOptions]
-> Read UpdateDomainEndpointOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainEndpointOptions]
$creadListPrec :: ReadPrec [UpdateDomainEndpointOptions]
readPrec :: ReadPrec UpdateDomainEndpointOptions
$creadPrec :: ReadPrec UpdateDomainEndpointOptions
readList :: ReadS [UpdateDomainEndpointOptions]
$creadList :: ReadS [UpdateDomainEndpointOptions]
readsPrec :: Int -> ReadS UpdateDomainEndpointOptions
$creadsPrec :: Int -> ReadS UpdateDomainEndpointOptions
Prelude.Read, Int -> UpdateDomainEndpointOptions -> ShowS
[UpdateDomainEndpointOptions] -> ShowS
UpdateDomainEndpointOptions -> String
(Int -> UpdateDomainEndpointOptions -> ShowS)
-> (UpdateDomainEndpointOptions -> String)
-> ([UpdateDomainEndpointOptions] -> ShowS)
-> Show UpdateDomainEndpointOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainEndpointOptions] -> ShowS
$cshowList :: [UpdateDomainEndpointOptions] -> ShowS
show :: UpdateDomainEndpointOptions -> String
$cshow :: UpdateDomainEndpointOptions -> String
showsPrec :: Int -> UpdateDomainEndpointOptions -> ShowS
$cshowsPrec :: Int -> UpdateDomainEndpointOptions -> ShowS
Prelude.Show, (forall x.
UpdateDomainEndpointOptions -> Rep UpdateDomainEndpointOptions x)
-> (forall x.
Rep UpdateDomainEndpointOptions x -> UpdateDomainEndpointOptions)
-> Generic UpdateDomainEndpointOptions
forall x.
Rep UpdateDomainEndpointOptions x -> UpdateDomainEndpointOptions
forall x.
UpdateDomainEndpointOptions -> Rep UpdateDomainEndpointOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainEndpointOptions x -> UpdateDomainEndpointOptions
$cfrom :: forall x.
UpdateDomainEndpointOptions -> Rep UpdateDomainEndpointOptions x
Prelude.Generic)
newUpdateDomainEndpointOptions ::
Prelude.Text ->
DomainEndpointOptions ->
UpdateDomainEndpointOptions
newUpdateDomainEndpointOptions :: Text -> DomainEndpointOptions -> UpdateDomainEndpointOptions
newUpdateDomainEndpointOptions
Text
pDomainName_
DomainEndpointOptions
pDomainEndpointOptions_ =
UpdateDomainEndpointOptions' :: Text -> DomainEndpointOptions -> UpdateDomainEndpointOptions
UpdateDomainEndpointOptions'
{ $sel:domainName:UpdateDomainEndpointOptions' :: Text
domainName =
Text
pDomainName_,
$sel:domainEndpointOptions:UpdateDomainEndpointOptions' :: DomainEndpointOptions
domainEndpointOptions =
DomainEndpointOptions
pDomainEndpointOptions_
}
updateDomainEndpointOptions_domainName :: Lens.Lens' UpdateDomainEndpointOptions Prelude.Text
updateDomainEndpointOptions_domainName :: (Text -> f Text)
-> UpdateDomainEndpointOptions -> f UpdateDomainEndpointOptions
updateDomainEndpointOptions_domainName = (UpdateDomainEndpointOptions -> Text)
-> (UpdateDomainEndpointOptions
-> Text -> UpdateDomainEndpointOptions)
-> Lens
UpdateDomainEndpointOptions UpdateDomainEndpointOptions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainEndpointOptions' {Text
domainName :: Text
$sel:domainName:UpdateDomainEndpointOptions' :: UpdateDomainEndpointOptions -> Text
domainName} -> Text
domainName) (\s :: UpdateDomainEndpointOptions
s@UpdateDomainEndpointOptions' {} Text
a -> UpdateDomainEndpointOptions
s {$sel:domainName:UpdateDomainEndpointOptions' :: Text
domainName = Text
a} :: UpdateDomainEndpointOptions)
updateDomainEndpointOptions_domainEndpointOptions :: Lens.Lens' UpdateDomainEndpointOptions DomainEndpointOptions
updateDomainEndpointOptions_domainEndpointOptions :: (DomainEndpointOptions -> f DomainEndpointOptions)
-> UpdateDomainEndpointOptions -> f UpdateDomainEndpointOptions
updateDomainEndpointOptions_domainEndpointOptions = (UpdateDomainEndpointOptions -> DomainEndpointOptions)
-> (UpdateDomainEndpointOptions
-> DomainEndpointOptions -> UpdateDomainEndpointOptions)
-> Lens
UpdateDomainEndpointOptions
UpdateDomainEndpointOptions
DomainEndpointOptions
DomainEndpointOptions
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainEndpointOptions' {DomainEndpointOptions
domainEndpointOptions :: DomainEndpointOptions
$sel:domainEndpointOptions:UpdateDomainEndpointOptions' :: UpdateDomainEndpointOptions -> DomainEndpointOptions
domainEndpointOptions} -> DomainEndpointOptions
domainEndpointOptions) (\s :: UpdateDomainEndpointOptions
s@UpdateDomainEndpointOptions' {} DomainEndpointOptions
a -> UpdateDomainEndpointOptions
s {$sel:domainEndpointOptions:UpdateDomainEndpointOptions' :: DomainEndpointOptions
domainEndpointOptions = DomainEndpointOptions
a} :: UpdateDomainEndpointOptions)
instance Core.AWSRequest UpdateDomainEndpointOptions where
type
AWSResponse UpdateDomainEndpointOptions =
UpdateDomainEndpointOptionsResponse
request :: UpdateDomainEndpointOptions -> Request UpdateDomainEndpointOptions
request = Service
-> UpdateDomainEndpointOptions
-> Request UpdateDomainEndpointOptions
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateDomainEndpointOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDomainEndpointOptions)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse UpdateDomainEndpointOptions))
-> Logger
-> Service
-> Proxy UpdateDomainEndpointOptions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDomainEndpointOptions)))
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
"UpdateDomainEndpointOptionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe DomainEndpointOptionsStatus
-> Int -> UpdateDomainEndpointOptionsResponse
UpdateDomainEndpointOptionsResponse'
(Maybe DomainEndpointOptionsStatus
-> Int -> UpdateDomainEndpointOptionsResponse)
-> Either String (Maybe DomainEndpointOptionsStatus)
-> Either String (Int -> UpdateDomainEndpointOptionsResponse)
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 -> UpdateDomainEndpointOptionsResponse)
-> Either String Int
-> Either String UpdateDomainEndpointOptionsResponse
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 UpdateDomainEndpointOptions
instance Prelude.NFData UpdateDomainEndpointOptions
instance Core.ToHeaders UpdateDomainEndpointOptions where
toHeaders :: UpdateDomainEndpointOptions -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateDomainEndpointOptions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UpdateDomainEndpointOptions where
toPath :: UpdateDomainEndpointOptions -> ByteString
toPath = ByteString -> UpdateDomainEndpointOptions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateDomainEndpointOptions where
toQuery :: UpdateDomainEndpointOptions -> QueryString
toQuery UpdateDomainEndpointOptions' {Text
DomainEndpointOptions
domainEndpointOptions :: DomainEndpointOptions
domainName :: Text
$sel:domainEndpointOptions:UpdateDomainEndpointOptions' :: UpdateDomainEndpointOptions -> DomainEndpointOptions
$sel:domainName:UpdateDomainEndpointOptions' :: UpdateDomainEndpointOptions -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"UpdateDomainEndpointOptions" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2013-01-01" :: Prelude.ByteString),
ByteString
"DomainName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domainName,
ByteString
"DomainEndpointOptions"
ByteString -> DomainEndpointOptions -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: DomainEndpointOptions
domainEndpointOptions
]
data UpdateDomainEndpointOptionsResponse = UpdateDomainEndpointOptionsResponse'
{
UpdateDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus
domainEndpointOptions :: Prelude.Maybe DomainEndpointOptionsStatus,
UpdateDomainEndpointOptionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool
(UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool)
-> (UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool)
-> Eq UpdateDomainEndpointOptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool
$c/= :: UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool
== :: UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool
$c== :: UpdateDomainEndpointOptionsResponse
-> UpdateDomainEndpointOptionsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDomainEndpointOptionsResponse]
ReadPrec UpdateDomainEndpointOptionsResponse
Int -> ReadS UpdateDomainEndpointOptionsResponse
ReadS [UpdateDomainEndpointOptionsResponse]
(Int -> ReadS UpdateDomainEndpointOptionsResponse)
-> ReadS [UpdateDomainEndpointOptionsResponse]
-> ReadPrec UpdateDomainEndpointOptionsResponse
-> ReadPrec [UpdateDomainEndpointOptionsResponse]
-> Read UpdateDomainEndpointOptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainEndpointOptionsResponse]
$creadListPrec :: ReadPrec [UpdateDomainEndpointOptionsResponse]
readPrec :: ReadPrec UpdateDomainEndpointOptionsResponse
$creadPrec :: ReadPrec UpdateDomainEndpointOptionsResponse
readList :: ReadS [UpdateDomainEndpointOptionsResponse]
$creadList :: ReadS [UpdateDomainEndpointOptionsResponse]
readsPrec :: Int -> ReadS UpdateDomainEndpointOptionsResponse
$creadsPrec :: Int -> ReadS UpdateDomainEndpointOptionsResponse
Prelude.Read, Int -> UpdateDomainEndpointOptionsResponse -> ShowS
[UpdateDomainEndpointOptionsResponse] -> ShowS
UpdateDomainEndpointOptionsResponse -> String
(Int -> UpdateDomainEndpointOptionsResponse -> ShowS)
-> (UpdateDomainEndpointOptionsResponse -> String)
-> ([UpdateDomainEndpointOptionsResponse] -> ShowS)
-> Show UpdateDomainEndpointOptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainEndpointOptionsResponse] -> ShowS
$cshowList :: [UpdateDomainEndpointOptionsResponse] -> ShowS
show :: UpdateDomainEndpointOptionsResponse -> String
$cshow :: UpdateDomainEndpointOptionsResponse -> String
showsPrec :: Int -> UpdateDomainEndpointOptionsResponse -> ShowS
$cshowsPrec :: Int -> UpdateDomainEndpointOptionsResponse -> ShowS
Prelude.Show, (forall x.
UpdateDomainEndpointOptionsResponse
-> Rep UpdateDomainEndpointOptionsResponse x)
-> (forall x.
Rep UpdateDomainEndpointOptionsResponse x
-> UpdateDomainEndpointOptionsResponse)
-> Generic UpdateDomainEndpointOptionsResponse
forall x.
Rep UpdateDomainEndpointOptionsResponse x
-> UpdateDomainEndpointOptionsResponse
forall x.
UpdateDomainEndpointOptionsResponse
-> Rep UpdateDomainEndpointOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainEndpointOptionsResponse x
-> UpdateDomainEndpointOptionsResponse
$cfrom :: forall x.
UpdateDomainEndpointOptionsResponse
-> Rep UpdateDomainEndpointOptionsResponse x
Prelude.Generic)
newUpdateDomainEndpointOptionsResponse ::
Prelude.Int ->
UpdateDomainEndpointOptionsResponse
newUpdateDomainEndpointOptionsResponse :: Int -> UpdateDomainEndpointOptionsResponse
newUpdateDomainEndpointOptionsResponse Int
pHttpStatus_ =
UpdateDomainEndpointOptionsResponse' :: Maybe DomainEndpointOptionsStatus
-> Int -> UpdateDomainEndpointOptionsResponse
UpdateDomainEndpointOptionsResponse'
{ $sel:domainEndpointOptions:UpdateDomainEndpointOptionsResponse' :: Maybe DomainEndpointOptionsStatus
domainEndpointOptions =
Maybe DomainEndpointOptionsStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateDomainEndpointOptionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateDomainEndpointOptionsResponse_domainEndpointOptions :: Lens.Lens' UpdateDomainEndpointOptionsResponse (Prelude.Maybe DomainEndpointOptionsStatus)
updateDomainEndpointOptionsResponse_domainEndpointOptions :: (Maybe DomainEndpointOptionsStatus
-> f (Maybe DomainEndpointOptionsStatus))
-> UpdateDomainEndpointOptionsResponse
-> f UpdateDomainEndpointOptionsResponse
updateDomainEndpointOptionsResponse_domainEndpointOptions = (UpdateDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus)
-> (UpdateDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus
-> UpdateDomainEndpointOptionsResponse)
-> Lens
UpdateDomainEndpointOptionsResponse
UpdateDomainEndpointOptionsResponse
(Maybe DomainEndpointOptionsStatus)
(Maybe DomainEndpointOptionsStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainEndpointOptionsResponse' {Maybe DomainEndpointOptionsStatus
domainEndpointOptions :: Maybe DomainEndpointOptionsStatus
$sel:domainEndpointOptions:UpdateDomainEndpointOptionsResponse' :: UpdateDomainEndpointOptionsResponse
-> Maybe DomainEndpointOptionsStatus
domainEndpointOptions} -> Maybe DomainEndpointOptionsStatus
domainEndpointOptions) (\s :: UpdateDomainEndpointOptionsResponse
s@UpdateDomainEndpointOptionsResponse' {} Maybe DomainEndpointOptionsStatus
a -> UpdateDomainEndpointOptionsResponse
s {$sel:domainEndpointOptions:UpdateDomainEndpointOptionsResponse' :: Maybe DomainEndpointOptionsStatus
domainEndpointOptions = Maybe DomainEndpointOptionsStatus
a} :: UpdateDomainEndpointOptionsResponse)
updateDomainEndpointOptionsResponse_httpStatus :: Lens.Lens' UpdateDomainEndpointOptionsResponse Prelude.Int
updateDomainEndpointOptionsResponse_httpStatus :: (Int -> f Int)
-> UpdateDomainEndpointOptionsResponse
-> f UpdateDomainEndpointOptionsResponse
updateDomainEndpointOptionsResponse_httpStatus = (UpdateDomainEndpointOptionsResponse -> Int)
-> (UpdateDomainEndpointOptionsResponse
-> Int -> UpdateDomainEndpointOptionsResponse)
-> Lens
UpdateDomainEndpointOptionsResponse
UpdateDomainEndpointOptionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainEndpointOptionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateDomainEndpointOptionsResponse' :: UpdateDomainEndpointOptionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateDomainEndpointOptionsResponse
s@UpdateDomainEndpointOptionsResponse' {} Int
a -> UpdateDomainEndpointOptionsResponse
s {$sel:httpStatus:UpdateDomainEndpointOptionsResponse' :: Int
httpStatus = Int
a} :: UpdateDomainEndpointOptionsResponse)
instance
Prelude.NFData
UpdateDomainEndpointOptionsResponse