{-# 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.DeleteOutboundCrossClusterSearchConnection
(
DeleteOutboundCrossClusterSearchConnection (..),
newDeleteOutboundCrossClusterSearchConnection,
deleteOutboundCrossClusterSearchConnection_crossClusterSearchConnectionId,
DeleteOutboundCrossClusterSearchConnectionResponse (..),
newDeleteOutboundCrossClusterSearchConnectionResponse,
deleteOutboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection,
deleteOutboundCrossClusterSearchConnectionResponse_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 DeleteOutboundCrossClusterSearchConnection = DeleteOutboundCrossClusterSearchConnection'
{
DeleteOutboundCrossClusterSearchConnection -> Text
crossClusterSearchConnectionId :: Prelude.Text
}
deriving (DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool
(DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool)
-> (DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool)
-> Eq DeleteOutboundCrossClusterSearchConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool
$c/= :: DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool
== :: DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool
$c== :: DeleteOutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnection -> Bool
Prelude.Eq, ReadPrec [DeleteOutboundCrossClusterSearchConnection]
ReadPrec DeleteOutboundCrossClusterSearchConnection
Int -> ReadS DeleteOutboundCrossClusterSearchConnection
ReadS [DeleteOutboundCrossClusterSearchConnection]
(Int -> ReadS DeleteOutboundCrossClusterSearchConnection)
-> ReadS [DeleteOutboundCrossClusterSearchConnection]
-> ReadPrec DeleteOutboundCrossClusterSearchConnection
-> ReadPrec [DeleteOutboundCrossClusterSearchConnection]
-> Read DeleteOutboundCrossClusterSearchConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteOutboundCrossClusterSearchConnection]
$creadListPrec :: ReadPrec [DeleteOutboundCrossClusterSearchConnection]
readPrec :: ReadPrec DeleteOutboundCrossClusterSearchConnection
$creadPrec :: ReadPrec DeleteOutboundCrossClusterSearchConnection
readList :: ReadS [DeleteOutboundCrossClusterSearchConnection]
$creadList :: ReadS [DeleteOutboundCrossClusterSearchConnection]
readsPrec :: Int -> ReadS DeleteOutboundCrossClusterSearchConnection
$creadsPrec :: Int -> ReadS DeleteOutboundCrossClusterSearchConnection
Prelude.Read, Int -> DeleteOutboundCrossClusterSearchConnection -> ShowS
[DeleteOutboundCrossClusterSearchConnection] -> ShowS
DeleteOutboundCrossClusterSearchConnection -> String
(Int -> DeleteOutboundCrossClusterSearchConnection -> ShowS)
-> (DeleteOutboundCrossClusterSearchConnection -> String)
-> ([DeleteOutboundCrossClusterSearchConnection] -> ShowS)
-> Show DeleteOutboundCrossClusterSearchConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteOutboundCrossClusterSearchConnection] -> ShowS
$cshowList :: [DeleteOutboundCrossClusterSearchConnection] -> ShowS
show :: DeleteOutboundCrossClusterSearchConnection -> String
$cshow :: DeleteOutboundCrossClusterSearchConnection -> String
showsPrec :: Int -> DeleteOutboundCrossClusterSearchConnection -> ShowS
$cshowsPrec :: Int -> DeleteOutboundCrossClusterSearchConnection -> ShowS
Prelude.Show, (forall x.
DeleteOutboundCrossClusterSearchConnection
-> Rep DeleteOutboundCrossClusterSearchConnection x)
-> (forall x.
Rep DeleteOutboundCrossClusterSearchConnection x
-> DeleteOutboundCrossClusterSearchConnection)
-> Generic DeleteOutboundCrossClusterSearchConnection
forall x.
Rep DeleteOutboundCrossClusterSearchConnection x
-> DeleteOutboundCrossClusterSearchConnection
forall x.
DeleteOutboundCrossClusterSearchConnection
-> Rep DeleteOutboundCrossClusterSearchConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteOutboundCrossClusterSearchConnection x
-> DeleteOutboundCrossClusterSearchConnection
$cfrom :: forall x.
DeleteOutboundCrossClusterSearchConnection
-> Rep DeleteOutboundCrossClusterSearchConnection x
Prelude.Generic)
newDeleteOutboundCrossClusterSearchConnection ::
Prelude.Text ->
DeleteOutboundCrossClusterSearchConnection
newDeleteOutboundCrossClusterSearchConnection :: Text -> DeleteOutboundCrossClusterSearchConnection
newDeleteOutboundCrossClusterSearchConnection
Text
pCrossClusterSearchConnectionId_ =
DeleteOutboundCrossClusterSearchConnection' :: Text -> DeleteOutboundCrossClusterSearchConnection
DeleteOutboundCrossClusterSearchConnection'
{ $sel:crossClusterSearchConnectionId:DeleteOutboundCrossClusterSearchConnection' :: Text
crossClusterSearchConnectionId =
Text
pCrossClusterSearchConnectionId_
}
deleteOutboundCrossClusterSearchConnection_crossClusterSearchConnectionId :: Lens.Lens' DeleteOutboundCrossClusterSearchConnection Prelude.Text
deleteOutboundCrossClusterSearchConnection_crossClusterSearchConnectionId :: (Text -> f Text)
-> DeleteOutboundCrossClusterSearchConnection
-> f DeleteOutboundCrossClusterSearchConnection
deleteOutboundCrossClusterSearchConnection_crossClusterSearchConnectionId = (DeleteOutboundCrossClusterSearchConnection -> Text)
-> (DeleteOutboundCrossClusterSearchConnection
-> Text -> DeleteOutboundCrossClusterSearchConnection)
-> Lens
DeleteOutboundCrossClusterSearchConnection
DeleteOutboundCrossClusterSearchConnection
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteOutboundCrossClusterSearchConnection' {Text
crossClusterSearchConnectionId :: Text
$sel:crossClusterSearchConnectionId:DeleteOutboundCrossClusterSearchConnection' :: DeleteOutboundCrossClusterSearchConnection -> Text
crossClusterSearchConnectionId} -> Text
crossClusterSearchConnectionId) (\s :: DeleteOutboundCrossClusterSearchConnection
s@DeleteOutboundCrossClusterSearchConnection' {} Text
a -> DeleteOutboundCrossClusterSearchConnection
s {$sel:crossClusterSearchConnectionId:DeleteOutboundCrossClusterSearchConnection' :: Text
crossClusterSearchConnectionId = Text
a} :: DeleteOutboundCrossClusterSearchConnection)
instance
Core.AWSRequest
DeleteOutboundCrossClusterSearchConnection
where
type
AWSResponse
DeleteOutboundCrossClusterSearchConnection =
DeleteOutboundCrossClusterSearchConnectionResponse
request :: DeleteOutboundCrossClusterSearchConnection
-> Request DeleteOutboundCrossClusterSearchConnection
request = Service
-> DeleteOutboundCrossClusterSearchConnection
-> Request DeleteOutboundCrossClusterSearchConnection
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteOutboundCrossClusterSearchConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteOutboundCrossClusterSearchConnection)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either
String (AWSResponse DeleteOutboundCrossClusterSearchConnection))
-> Logger
-> Service
-> Proxy DeleteOutboundCrossClusterSearchConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DeleteOutboundCrossClusterSearchConnection)))
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 OutboundCrossClusterSearchConnection
-> Int -> DeleteOutboundCrossClusterSearchConnectionResponse
DeleteOutboundCrossClusterSearchConnectionResponse'
(Maybe OutboundCrossClusterSearchConnection
-> Int -> DeleteOutboundCrossClusterSearchConnectionResponse)
-> Either String (Maybe OutboundCrossClusterSearchConnection)
-> Either
String (Int -> DeleteOutboundCrossClusterSearchConnectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe OutboundCrossClusterSearchConnection)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CrossClusterSearchConnection")
Either
String (Int -> DeleteOutboundCrossClusterSearchConnectionResponse)
-> Either String Int
-> Either String DeleteOutboundCrossClusterSearchConnectionResponse
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
DeleteOutboundCrossClusterSearchConnection
instance
Prelude.NFData
DeleteOutboundCrossClusterSearchConnection
instance
Core.ToHeaders
DeleteOutboundCrossClusterSearchConnection
where
toHeaders :: DeleteOutboundCrossClusterSearchConnection -> ResponseHeaders
toHeaders = ResponseHeaders
-> DeleteOutboundCrossClusterSearchConnection -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DeleteOutboundCrossClusterSearchConnection
where
toPath :: DeleteOutboundCrossClusterSearchConnection -> ByteString
toPath
DeleteOutboundCrossClusterSearchConnection' {Text
crossClusterSearchConnectionId :: Text
$sel:crossClusterSearchConnectionId:DeleteOutboundCrossClusterSearchConnection' :: DeleteOutboundCrossClusterSearchConnection -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-01-01/es/ccs/outboundConnection/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
crossClusterSearchConnectionId
]
instance
Core.ToQuery
DeleteOutboundCrossClusterSearchConnection
where
toQuery :: DeleteOutboundCrossClusterSearchConnection -> QueryString
toQuery = QueryString
-> DeleteOutboundCrossClusterSearchConnection -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteOutboundCrossClusterSearchConnectionResponse = DeleteOutboundCrossClusterSearchConnectionResponse'
{
DeleteOutboundCrossClusterSearchConnectionResponse
-> Maybe OutboundCrossClusterSearchConnection
crossClusterSearchConnection :: Prelude.Maybe OutboundCrossClusterSearchConnection,
DeleteOutboundCrossClusterSearchConnectionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool
(DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool)
-> (DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool)
-> Eq DeleteOutboundCrossClusterSearchConnectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool
$c/= :: DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool
== :: DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool
$c== :: DeleteOutboundCrossClusterSearchConnectionResponse
-> DeleteOutboundCrossClusterSearchConnectionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteOutboundCrossClusterSearchConnectionResponse]
ReadPrec DeleteOutboundCrossClusterSearchConnectionResponse
Int -> ReadS DeleteOutboundCrossClusterSearchConnectionResponse
ReadS [DeleteOutboundCrossClusterSearchConnectionResponse]
(Int -> ReadS DeleteOutboundCrossClusterSearchConnectionResponse)
-> ReadS [DeleteOutboundCrossClusterSearchConnectionResponse]
-> ReadPrec DeleteOutboundCrossClusterSearchConnectionResponse
-> ReadPrec [DeleteOutboundCrossClusterSearchConnectionResponse]
-> Read DeleteOutboundCrossClusterSearchConnectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteOutboundCrossClusterSearchConnectionResponse]
$creadListPrec :: ReadPrec [DeleteOutboundCrossClusterSearchConnectionResponse]
readPrec :: ReadPrec DeleteOutboundCrossClusterSearchConnectionResponse
$creadPrec :: ReadPrec DeleteOutboundCrossClusterSearchConnectionResponse
readList :: ReadS [DeleteOutboundCrossClusterSearchConnectionResponse]
$creadList :: ReadS [DeleteOutboundCrossClusterSearchConnectionResponse]
readsPrec :: Int -> ReadS DeleteOutboundCrossClusterSearchConnectionResponse
$creadsPrec :: Int -> ReadS DeleteOutboundCrossClusterSearchConnectionResponse
Prelude.Read, Int -> DeleteOutboundCrossClusterSearchConnectionResponse -> ShowS
[DeleteOutboundCrossClusterSearchConnectionResponse] -> ShowS
DeleteOutboundCrossClusterSearchConnectionResponse -> String
(Int
-> DeleteOutboundCrossClusterSearchConnectionResponse -> ShowS)
-> (DeleteOutboundCrossClusterSearchConnectionResponse -> String)
-> ([DeleteOutboundCrossClusterSearchConnectionResponse] -> ShowS)
-> Show DeleteOutboundCrossClusterSearchConnectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteOutboundCrossClusterSearchConnectionResponse] -> ShowS
$cshowList :: [DeleteOutboundCrossClusterSearchConnectionResponse] -> ShowS
show :: DeleteOutboundCrossClusterSearchConnectionResponse -> String
$cshow :: DeleteOutboundCrossClusterSearchConnectionResponse -> String
showsPrec :: Int -> DeleteOutboundCrossClusterSearchConnectionResponse -> ShowS
$cshowsPrec :: Int -> DeleteOutboundCrossClusterSearchConnectionResponse -> ShowS
Prelude.Show, (forall x.
DeleteOutboundCrossClusterSearchConnectionResponse
-> Rep DeleteOutboundCrossClusterSearchConnectionResponse x)
-> (forall x.
Rep DeleteOutboundCrossClusterSearchConnectionResponse x
-> DeleteOutboundCrossClusterSearchConnectionResponse)
-> Generic DeleteOutboundCrossClusterSearchConnectionResponse
forall x.
Rep DeleteOutboundCrossClusterSearchConnectionResponse x
-> DeleteOutboundCrossClusterSearchConnectionResponse
forall x.
DeleteOutboundCrossClusterSearchConnectionResponse
-> Rep DeleteOutboundCrossClusterSearchConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteOutboundCrossClusterSearchConnectionResponse x
-> DeleteOutboundCrossClusterSearchConnectionResponse
$cfrom :: forall x.
DeleteOutboundCrossClusterSearchConnectionResponse
-> Rep DeleteOutboundCrossClusterSearchConnectionResponse x
Prelude.Generic)
newDeleteOutboundCrossClusterSearchConnectionResponse ::
Prelude.Int ->
DeleteOutboundCrossClusterSearchConnectionResponse
newDeleteOutboundCrossClusterSearchConnectionResponse :: Int -> DeleteOutboundCrossClusterSearchConnectionResponse
newDeleteOutboundCrossClusterSearchConnectionResponse
Int
pHttpStatus_ =
DeleteOutboundCrossClusterSearchConnectionResponse' :: Maybe OutboundCrossClusterSearchConnection
-> Int -> DeleteOutboundCrossClusterSearchConnectionResponse
DeleteOutboundCrossClusterSearchConnectionResponse'
{ $sel:crossClusterSearchConnection:DeleteOutboundCrossClusterSearchConnectionResponse' :: Maybe OutboundCrossClusterSearchConnection
crossClusterSearchConnection =
Maybe OutboundCrossClusterSearchConnection
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteOutboundCrossClusterSearchConnectionResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteOutboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection :: Lens.Lens' DeleteOutboundCrossClusterSearchConnectionResponse (Prelude.Maybe OutboundCrossClusterSearchConnection)
deleteOutboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection :: (Maybe OutboundCrossClusterSearchConnection
-> f (Maybe OutboundCrossClusterSearchConnection))
-> DeleteOutboundCrossClusterSearchConnectionResponse
-> f DeleteOutboundCrossClusterSearchConnectionResponse
deleteOutboundCrossClusterSearchConnectionResponse_crossClusterSearchConnection = (DeleteOutboundCrossClusterSearchConnectionResponse
-> Maybe OutboundCrossClusterSearchConnection)
-> (DeleteOutboundCrossClusterSearchConnectionResponse
-> Maybe OutboundCrossClusterSearchConnection
-> DeleteOutboundCrossClusterSearchConnectionResponse)
-> Lens
DeleteOutboundCrossClusterSearchConnectionResponse
DeleteOutboundCrossClusterSearchConnectionResponse
(Maybe OutboundCrossClusterSearchConnection)
(Maybe OutboundCrossClusterSearchConnection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteOutboundCrossClusterSearchConnectionResponse' {Maybe OutboundCrossClusterSearchConnection
crossClusterSearchConnection :: Maybe OutboundCrossClusterSearchConnection
$sel:crossClusterSearchConnection:DeleteOutboundCrossClusterSearchConnectionResponse' :: DeleteOutboundCrossClusterSearchConnectionResponse
-> Maybe OutboundCrossClusterSearchConnection
crossClusterSearchConnection} -> Maybe OutboundCrossClusterSearchConnection
crossClusterSearchConnection) (\s :: DeleteOutboundCrossClusterSearchConnectionResponse
s@DeleteOutboundCrossClusterSearchConnectionResponse' {} Maybe OutboundCrossClusterSearchConnection
a -> DeleteOutboundCrossClusterSearchConnectionResponse
s {$sel:crossClusterSearchConnection:DeleteOutboundCrossClusterSearchConnectionResponse' :: Maybe OutboundCrossClusterSearchConnection
crossClusterSearchConnection = Maybe OutboundCrossClusterSearchConnection
a} :: DeleteOutboundCrossClusterSearchConnectionResponse)
deleteOutboundCrossClusterSearchConnectionResponse_httpStatus :: Lens.Lens' DeleteOutboundCrossClusterSearchConnectionResponse Prelude.Int
deleteOutboundCrossClusterSearchConnectionResponse_httpStatus :: (Int -> f Int)
-> DeleteOutboundCrossClusterSearchConnectionResponse
-> f DeleteOutboundCrossClusterSearchConnectionResponse
deleteOutboundCrossClusterSearchConnectionResponse_httpStatus = (DeleteOutboundCrossClusterSearchConnectionResponse -> Int)
-> (DeleteOutboundCrossClusterSearchConnectionResponse
-> Int -> DeleteOutboundCrossClusterSearchConnectionResponse)
-> Lens
DeleteOutboundCrossClusterSearchConnectionResponse
DeleteOutboundCrossClusterSearchConnectionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteOutboundCrossClusterSearchConnectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteOutboundCrossClusterSearchConnectionResponse' :: DeleteOutboundCrossClusterSearchConnectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteOutboundCrossClusterSearchConnectionResponse
s@DeleteOutboundCrossClusterSearchConnectionResponse' {} Int
a -> DeleteOutboundCrossClusterSearchConnectionResponse
s {$sel:httpStatus:DeleteOutboundCrossClusterSearchConnectionResponse' :: Int
httpStatus = Int
a} :: DeleteOutboundCrossClusterSearchConnectionResponse)
instance
Prelude.NFData
DeleteOutboundCrossClusterSearchConnectionResponse