{-# 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.ElasticSearch.RejectInboundCrossClusterSearchConnection
(
RejectInboundCrossClusterSearchConnection (..),
newRejectInboundCrossClusterSearchConnection,
rejectInboundCrossClusterSearchConnection_crossClusterSearchConnectionId,
RejectInboundCrossClusterSearchConnectionResponse (..),
newRejectInboundCrossClusterSearchConnectionResponse,
rejectInboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection,
rejectInboundCrossClusterSearchConnectionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types
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 RejectInboundCrossClusterSearchConnection = RejectInboundCrossClusterSearchConnection'
{
RejectInboundCrossClusterSearchConnection -> Text
crossClusterSearchConnectionId :: Prelude.Text
}
deriving (RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool
(RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool)
-> (RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool)
-> Eq RejectInboundCrossClusterSearchConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool
$c/= :: RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool
== :: RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool
$c== :: RejectInboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnection -> Bool
Prelude.Eq, ReadPrec [RejectInboundCrossClusterSearchConnection]
ReadPrec RejectInboundCrossClusterSearchConnection
Int -> ReadS RejectInboundCrossClusterSearchConnection
ReadS [RejectInboundCrossClusterSearchConnection]
(Int -> ReadS RejectInboundCrossClusterSearchConnection)
-> ReadS [RejectInboundCrossClusterSearchConnection]
-> ReadPrec RejectInboundCrossClusterSearchConnection
-> ReadPrec [RejectInboundCrossClusterSearchConnection]
-> Read RejectInboundCrossClusterSearchConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RejectInboundCrossClusterSearchConnection]
$creadListPrec :: ReadPrec [RejectInboundCrossClusterSearchConnection]
readPrec :: ReadPrec RejectInboundCrossClusterSearchConnection
$creadPrec :: ReadPrec RejectInboundCrossClusterSearchConnection
readList :: ReadS [RejectInboundCrossClusterSearchConnection]
$creadList :: ReadS [RejectInboundCrossClusterSearchConnection]
readsPrec :: Int -> ReadS RejectInboundCrossClusterSearchConnection
$creadsPrec :: Int -> ReadS RejectInboundCrossClusterSearchConnection
Prelude.Read, Int -> RejectInboundCrossClusterSearchConnection -> ShowS
[RejectInboundCrossClusterSearchConnection] -> ShowS
RejectInboundCrossClusterSearchConnection -> String
(Int -> RejectInboundCrossClusterSearchConnection -> ShowS)
-> (RejectInboundCrossClusterSearchConnection -> String)
-> ([RejectInboundCrossClusterSearchConnection] -> ShowS)
-> Show RejectInboundCrossClusterSearchConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RejectInboundCrossClusterSearchConnection] -> ShowS
$cshowList :: [RejectInboundCrossClusterSearchConnection] -> ShowS
show :: RejectInboundCrossClusterSearchConnection -> String
$cshow :: RejectInboundCrossClusterSearchConnection -> String
showsPrec :: Int -> RejectInboundCrossClusterSearchConnection -> ShowS
$cshowsPrec :: Int -> RejectInboundCrossClusterSearchConnection -> ShowS
Prelude.Show, (forall x.
RejectInboundCrossClusterSearchConnection
-> Rep RejectInboundCrossClusterSearchConnection x)
-> (forall x.
Rep RejectInboundCrossClusterSearchConnection x
-> RejectInboundCrossClusterSearchConnection)
-> Generic RejectInboundCrossClusterSearchConnection
forall x.
Rep RejectInboundCrossClusterSearchConnection x
-> RejectInboundCrossClusterSearchConnection
forall x.
RejectInboundCrossClusterSearchConnection
-> Rep RejectInboundCrossClusterSearchConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RejectInboundCrossClusterSearchConnection x
-> RejectInboundCrossClusterSearchConnection
$cfrom :: forall x.
RejectInboundCrossClusterSearchConnection
-> Rep RejectInboundCrossClusterSearchConnection x
Prelude.Generic)
newRejectInboundCrossClusterSearchConnection ::
Prelude.Text ->
RejectInboundCrossClusterSearchConnection
newRejectInboundCrossClusterSearchConnection :: Text -> RejectInboundCrossClusterSearchConnection
newRejectInboundCrossClusterSearchConnection
Text
pCrossClusterSearchConnectionId_ =
RejectInboundCrossClusterSearchConnection' :: Text -> RejectInboundCrossClusterSearchConnection
RejectInboundCrossClusterSearchConnection'
{ $sel:crossClusterSearchConnectionId:RejectInboundCrossClusterSearchConnection' :: Text
crossClusterSearchConnectionId =
Text
pCrossClusterSearchConnectionId_
}
rejectInboundCrossClusterSearchConnection_crossClusterSearchConnectionId :: Lens.Lens' RejectInboundCrossClusterSearchConnection Prelude.Text
rejectInboundCrossClusterSearchConnection_crossClusterSearchConnectionId :: (Text -> f Text)
-> RejectInboundCrossClusterSearchConnection
-> f RejectInboundCrossClusterSearchConnection
rejectInboundCrossClusterSearchConnection_crossClusterSearchConnectionId = (RejectInboundCrossClusterSearchConnection -> Text)
-> (RejectInboundCrossClusterSearchConnection
-> Text -> RejectInboundCrossClusterSearchConnection)
-> Lens
RejectInboundCrossClusterSearchConnection
RejectInboundCrossClusterSearchConnection
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectInboundCrossClusterSearchConnection' {Text
crossClusterSearchConnectionId :: Text
$sel:crossClusterSearchConnectionId:RejectInboundCrossClusterSearchConnection' :: RejectInboundCrossClusterSearchConnection -> Text
crossClusterSearchConnectionId} -> Text
crossClusterSearchConnectionId) (\s :: RejectInboundCrossClusterSearchConnection
s@RejectInboundCrossClusterSearchConnection' {} Text
a -> RejectInboundCrossClusterSearchConnection
s {$sel:crossClusterSearchConnectionId:RejectInboundCrossClusterSearchConnection' :: Text
crossClusterSearchConnectionId = Text
a} :: RejectInboundCrossClusterSearchConnection)
instance
Core.AWSRequest
RejectInboundCrossClusterSearchConnection
where
type
AWSResponse
RejectInboundCrossClusterSearchConnection =
RejectInboundCrossClusterSearchConnectionResponse
request :: RejectInboundCrossClusterSearchConnection
-> Request RejectInboundCrossClusterSearchConnection
request = Service
-> RejectInboundCrossClusterSearchConnection
-> Request RejectInboundCrossClusterSearchConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RejectInboundCrossClusterSearchConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse RejectInboundCrossClusterSearchConnection)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse RejectInboundCrossClusterSearchConnection))
-> Logger
-> Service
-> Proxy RejectInboundCrossClusterSearchConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse RejectInboundCrossClusterSearchConnection)))
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 ->
Maybe InboundCrossClusterSearchConnection
-> Int -> RejectInboundCrossClusterSearchConnectionResponse
RejectInboundCrossClusterSearchConnectionResponse'
(Maybe InboundCrossClusterSearchConnection
-> Int -> RejectInboundCrossClusterSearchConnectionResponse)
-> Either String (Maybe InboundCrossClusterSearchConnection)
-> Either
String (Int -> RejectInboundCrossClusterSearchConnectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe InboundCrossClusterSearchConnection)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CrossClusterSearchConnection")
Either
String (Int -> RejectInboundCrossClusterSearchConnectionResponse)
-> Either String Int
-> Either String RejectInboundCrossClusterSearchConnectionResponse
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
RejectInboundCrossClusterSearchConnection
instance
Prelude.NFData
RejectInboundCrossClusterSearchConnection
instance
Core.ToHeaders
RejectInboundCrossClusterSearchConnection
where
toHeaders :: RejectInboundCrossClusterSearchConnection -> ResponseHeaders
toHeaders = ResponseHeaders
-> RejectInboundCrossClusterSearchConnection -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToJSON
RejectInboundCrossClusterSearchConnection
where
toJSON :: RejectInboundCrossClusterSearchConnection -> Value
toJSON = Value -> RejectInboundCrossClusterSearchConnection -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance
Core.ToPath
RejectInboundCrossClusterSearchConnection
where
toPath :: RejectInboundCrossClusterSearchConnection -> ByteString
toPath RejectInboundCrossClusterSearchConnection' {Text
crossClusterSearchConnectionId :: Text
$sel:crossClusterSearchConnectionId:RejectInboundCrossClusterSearchConnection' :: RejectInboundCrossClusterSearchConnection -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-01-01/es/ccs/inboundConnection/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
crossClusterSearchConnectionId,
ByteString
"/reject"
]
instance
Core.ToQuery
RejectInboundCrossClusterSearchConnection
where
toQuery :: RejectInboundCrossClusterSearchConnection -> QueryString
toQuery = QueryString
-> RejectInboundCrossClusterSearchConnection -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RejectInboundCrossClusterSearchConnectionResponse = RejectInboundCrossClusterSearchConnectionResponse'
{
RejectInboundCrossClusterSearchConnectionResponse
-> Maybe InboundCrossClusterSearchConnection
crossClusterSearchConnection :: Prelude.Maybe InboundCrossClusterSearchConnection,
RejectInboundCrossClusterSearchConnectionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool
(RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool)
-> (RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool)
-> Eq RejectInboundCrossClusterSearchConnectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool
$c/= :: RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool
== :: RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool
$c== :: RejectInboundCrossClusterSearchConnectionResponse
-> RejectInboundCrossClusterSearchConnectionResponse -> Bool
Prelude.Eq, ReadPrec [RejectInboundCrossClusterSearchConnectionResponse]
ReadPrec RejectInboundCrossClusterSearchConnectionResponse
Int -> ReadS RejectInboundCrossClusterSearchConnectionResponse
ReadS [RejectInboundCrossClusterSearchConnectionResponse]
(Int -> ReadS RejectInboundCrossClusterSearchConnectionResponse)
-> ReadS [RejectInboundCrossClusterSearchConnectionResponse]
-> ReadPrec RejectInboundCrossClusterSearchConnectionResponse
-> ReadPrec [RejectInboundCrossClusterSearchConnectionResponse]
-> Read RejectInboundCrossClusterSearchConnectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RejectInboundCrossClusterSearchConnectionResponse]
$creadListPrec :: ReadPrec [RejectInboundCrossClusterSearchConnectionResponse]
readPrec :: ReadPrec RejectInboundCrossClusterSearchConnectionResponse
$creadPrec :: ReadPrec RejectInboundCrossClusterSearchConnectionResponse
readList :: ReadS [RejectInboundCrossClusterSearchConnectionResponse]
$creadList :: ReadS [RejectInboundCrossClusterSearchConnectionResponse]
readsPrec :: Int -> ReadS RejectInboundCrossClusterSearchConnectionResponse
$creadsPrec :: Int -> ReadS RejectInboundCrossClusterSearchConnectionResponse
Prelude.Read, Int -> RejectInboundCrossClusterSearchConnectionResponse -> ShowS
[RejectInboundCrossClusterSearchConnectionResponse] -> ShowS
RejectInboundCrossClusterSearchConnectionResponse -> String
(Int -> RejectInboundCrossClusterSearchConnectionResponse -> ShowS)
-> (RejectInboundCrossClusterSearchConnectionResponse -> String)
-> ([RejectInboundCrossClusterSearchConnectionResponse] -> ShowS)
-> Show RejectInboundCrossClusterSearchConnectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RejectInboundCrossClusterSearchConnectionResponse] -> ShowS
$cshowList :: [RejectInboundCrossClusterSearchConnectionResponse] -> ShowS
show :: RejectInboundCrossClusterSearchConnectionResponse -> String
$cshow :: RejectInboundCrossClusterSearchConnectionResponse -> String
showsPrec :: Int -> RejectInboundCrossClusterSearchConnectionResponse -> ShowS
$cshowsPrec :: Int -> RejectInboundCrossClusterSearchConnectionResponse -> ShowS
Prelude.Show, (forall x.
RejectInboundCrossClusterSearchConnectionResponse
-> Rep RejectInboundCrossClusterSearchConnectionResponse x)
-> (forall x.
Rep RejectInboundCrossClusterSearchConnectionResponse x
-> RejectInboundCrossClusterSearchConnectionResponse)
-> Generic RejectInboundCrossClusterSearchConnectionResponse
forall x.
Rep RejectInboundCrossClusterSearchConnectionResponse x
-> RejectInboundCrossClusterSearchConnectionResponse
forall x.
RejectInboundCrossClusterSearchConnectionResponse
-> Rep RejectInboundCrossClusterSearchConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RejectInboundCrossClusterSearchConnectionResponse x
-> RejectInboundCrossClusterSearchConnectionResponse
$cfrom :: forall x.
RejectInboundCrossClusterSearchConnectionResponse
-> Rep RejectInboundCrossClusterSearchConnectionResponse x
Prelude.Generic)
newRejectInboundCrossClusterSearchConnectionResponse ::
Prelude.Int ->
RejectInboundCrossClusterSearchConnectionResponse
newRejectInboundCrossClusterSearchConnectionResponse :: Int -> RejectInboundCrossClusterSearchConnectionResponse
newRejectInboundCrossClusterSearchConnectionResponse
Int
pHttpStatus_ =
RejectInboundCrossClusterSearchConnectionResponse' :: Maybe InboundCrossClusterSearchConnection
-> Int -> RejectInboundCrossClusterSearchConnectionResponse
RejectInboundCrossClusterSearchConnectionResponse'
{ $sel:crossClusterSearchConnection:RejectInboundCrossClusterSearchConnectionResponse' :: Maybe InboundCrossClusterSearchConnection
crossClusterSearchConnection =
Maybe InboundCrossClusterSearchConnection
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RejectInboundCrossClusterSearchConnectionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
rejectInboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection :: Lens.Lens' RejectInboundCrossClusterSearchConnectionResponse (Prelude.Maybe InboundCrossClusterSearchConnection)
rejectInboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection :: (Maybe InboundCrossClusterSearchConnection
-> f (Maybe InboundCrossClusterSearchConnection))
-> RejectInboundCrossClusterSearchConnectionResponse
-> f RejectInboundCrossClusterSearchConnectionResponse
rejectInboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection = (RejectInboundCrossClusterSearchConnectionResponse
-> Maybe InboundCrossClusterSearchConnection)
-> (RejectInboundCrossClusterSearchConnectionResponse
-> Maybe InboundCrossClusterSearchConnection
-> RejectInboundCrossClusterSearchConnectionResponse)
-> Lens
RejectInboundCrossClusterSearchConnectionResponse
RejectInboundCrossClusterSearchConnectionResponse
(Maybe InboundCrossClusterSearchConnection)
(Maybe InboundCrossClusterSearchConnection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectInboundCrossClusterSearchConnectionResponse' {Maybe InboundCrossClusterSearchConnection
crossClusterSearchConnection :: Maybe InboundCrossClusterSearchConnection
$sel:crossClusterSearchConnection:RejectInboundCrossClusterSearchConnectionResponse' :: RejectInboundCrossClusterSearchConnectionResponse
-> Maybe InboundCrossClusterSearchConnection
crossClusterSearchConnection} -> Maybe InboundCrossClusterSearchConnection
crossClusterSearchConnection) (\s :: RejectInboundCrossClusterSearchConnectionResponse
s@RejectInboundCrossClusterSearchConnectionResponse' {} Maybe InboundCrossClusterSearchConnection
a -> RejectInboundCrossClusterSearchConnectionResponse
s {$sel:crossClusterSearchConnection:RejectInboundCrossClusterSearchConnectionResponse' :: Maybe InboundCrossClusterSearchConnection
crossClusterSearchConnection = Maybe InboundCrossClusterSearchConnection
a} :: RejectInboundCrossClusterSearchConnectionResponse)
rejectInboundCrossClusterSearchConnectionResponse_httpStatus :: Lens.Lens' RejectInboundCrossClusterSearchConnectionResponse Prelude.Int
rejectInboundCrossClusterSearchConnectionResponse_httpStatus :: (Int -> f Int)
-> RejectInboundCrossClusterSearchConnectionResponse
-> f RejectInboundCrossClusterSearchConnectionResponse
rejectInboundCrossClusterSearchConnectionResponse_httpStatus = (RejectInboundCrossClusterSearchConnectionResponse -> Int)
-> (RejectInboundCrossClusterSearchConnectionResponse
-> Int -> RejectInboundCrossClusterSearchConnectionResponse)
-> Lens
RejectInboundCrossClusterSearchConnectionResponse
RejectInboundCrossClusterSearchConnectionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectInboundCrossClusterSearchConnectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:RejectInboundCrossClusterSearchConnectionResponse' :: RejectInboundCrossClusterSearchConnectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RejectInboundCrossClusterSearchConnectionResponse
s@RejectInboundCrossClusterSearchConnectionResponse' {} Int
a -> RejectInboundCrossClusterSearchConnectionResponse
s {$sel:httpStatus:RejectInboundCrossClusterSearchConnectionResponse' :: Int
httpStatus = Int
a} :: RejectInboundCrossClusterSearchConnectionResponse)
instance
Prelude.NFData
RejectInboundCrossClusterSearchConnectionResponse