{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ElasticSearch.Types.InboundCrossClusterSearchConnection where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.DomainInformation
import Amazonka.ElasticSearch.Types.InboundCrossClusterSearchConnectionStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InboundCrossClusterSearchConnection = InboundCrossClusterSearchConnection'
{
InboundCrossClusterSearchConnection -> Maybe DomainInformation
destinationDomainInfo :: Prelude.Maybe DomainInformation,
InboundCrossClusterSearchConnection -> Maybe Text
crossClusterSearchConnectionId :: Prelude.Maybe Prelude.Text,
InboundCrossClusterSearchConnection
-> Maybe InboundCrossClusterSearchConnectionStatus
connectionStatus :: Prelude.Maybe InboundCrossClusterSearchConnectionStatus,
InboundCrossClusterSearchConnection -> Maybe DomainInformation
sourceDomainInfo :: Prelude.Maybe DomainInformation
}
deriving (InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool
(InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool)
-> (InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool)
-> Eq InboundCrossClusterSearchConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool
$c/= :: InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool
== :: InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool
$c== :: InboundCrossClusterSearchConnection
-> InboundCrossClusterSearchConnection -> Bool
Prelude.Eq, ReadPrec [InboundCrossClusterSearchConnection]
ReadPrec InboundCrossClusterSearchConnection
Int -> ReadS InboundCrossClusterSearchConnection
ReadS [InboundCrossClusterSearchConnection]
(Int -> ReadS InboundCrossClusterSearchConnection)
-> ReadS [InboundCrossClusterSearchConnection]
-> ReadPrec InboundCrossClusterSearchConnection
-> ReadPrec [InboundCrossClusterSearchConnection]
-> Read InboundCrossClusterSearchConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InboundCrossClusterSearchConnection]
$creadListPrec :: ReadPrec [InboundCrossClusterSearchConnection]
readPrec :: ReadPrec InboundCrossClusterSearchConnection
$creadPrec :: ReadPrec InboundCrossClusterSearchConnection
readList :: ReadS [InboundCrossClusterSearchConnection]
$creadList :: ReadS [InboundCrossClusterSearchConnection]
readsPrec :: Int -> ReadS InboundCrossClusterSearchConnection
$creadsPrec :: Int -> ReadS InboundCrossClusterSearchConnection
Prelude.Read, Int -> InboundCrossClusterSearchConnection -> ShowS
[InboundCrossClusterSearchConnection] -> ShowS
InboundCrossClusterSearchConnection -> String
(Int -> InboundCrossClusterSearchConnection -> ShowS)
-> (InboundCrossClusterSearchConnection -> String)
-> ([InboundCrossClusterSearchConnection] -> ShowS)
-> Show InboundCrossClusterSearchConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InboundCrossClusterSearchConnection] -> ShowS
$cshowList :: [InboundCrossClusterSearchConnection] -> ShowS
show :: InboundCrossClusterSearchConnection -> String
$cshow :: InboundCrossClusterSearchConnection -> String
showsPrec :: Int -> InboundCrossClusterSearchConnection -> ShowS
$cshowsPrec :: Int -> InboundCrossClusterSearchConnection -> ShowS
Prelude.Show, (forall x.
InboundCrossClusterSearchConnection
-> Rep InboundCrossClusterSearchConnection x)
-> (forall x.
Rep InboundCrossClusterSearchConnection x
-> InboundCrossClusterSearchConnection)
-> Generic InboundCrossClusterSearchConnection
forall x.
Rep InboundCrossClusterSearchConnection x
-> InboundCrossClusterSearchConnection
forall x.
InboundCrossClusterSearchConnection
-> Rep InboundCrossClusterSearchConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InboundCrossClusterSearchConnection x
-> InboundCrossClusterSearchConnection
$cfrom :: forall x.
InboundCrossClusterSearchConnection
-> Rep InboundCrossClusterSearchConnection x
Prelude.Generic)
newInboundCrossClusterSearchConnection ::
InboundCrossClusterSearchConnection
newInboundCrossClusterSearchConnection :: InboundCrossClusterSearchConnection
newInboundCrossClusterSearchConnection =
InboundCrossClusterSearchConnection' :: Maybe DomainInformation
-> Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation
-> InboundCrossClusterSearchConnection
InboundCrossClusterSearchConnection'
{ $sel:destinationDomainInfo:InboundCrossClusterSearchConnection' :: Maybe DomainInformation
destinationDomainInfo =
Maybe DomainInformation
forall a. Maybe a
Prelude.Nothing,
$sel:crossClusterSearchConnectionId:InboundCrossClusterSearchConnection' :: Maybe Text
crossClusterSearchConnectionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionStatus:InboundCrossClusterSearchConnection' :: Maybe InboundCrossClusterSearchConnectionStatus
connectionStatus = Maybe InboundCrossClusterSearchConnectionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:sourceDomainInfo:InboundCrossClusterSearchConnection' :: Maybe DomainInformation
sourceDomainInfo = Maybe DomainInformation
forall a. Maybe a
Prelude.Nothing
}
inboundCrossClusterSearchConnection_destinationDomainInfo :: Lens.Lens' InboundCrossClusterSearchConnection (Prelude.Maybe DomainInformation)
inboundCrossClusterSearchConnection_destinationDomainInfo :: (Maybe DomainInformation -> f (Maybe DomainInformation))
-> InboundCrossClusterSearchConnection
-> f InboundCrossClusterSearchConnection
inboundCrossClusterSearchConnection_destinationDomainInfo = (InboundCrossClusterSearchConnection -> Maybe DomainInformation)
-> (InboundCrossClusterSearchConnection
-> Maybe DomainInformation -> InboundCrossClusterSearchConnection)
-> Lens
InboundCrossClusterSearchConnection
InboundCrossClusterSearchConnection
(Maybe DomainInformation)
(Maybe DomainInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InboundCrossClusterSearchConnection' {Maybe DomainInformation
destinationDomainInfo :: Maybe DomainInformation
$sel:destinationDomainInfo:InboundCrossClusterSearchConnection' :: InboundCrossClusterSearchConnection -> Maybe DomainInformation
destinationDomainInfo} -> Maybe DomainInformation
destinationDomainInfo) (\s :: InboundCrossClusterSearchConnection
s@InboundCrossClusterSearchConnection' {} Maybe DomainInformation
a -> InboundCrossClusterSearchConnection
s {$sel:destinationDomainInfo:InboundCrossClusterSearchConnection' :: Maybe DomainInformation
destinationDomainInfo = Maybe DomainInformation
a} :: InboundCrossClusterSearchConnection)
inboundCrossClusterSearchConnection_crossClusterSearchConnectionId :: Lens.Lens' InboundCrossClusterSearchConnection (Prelude.Maybe Prelude.Text)
inboundCrossClusterSearchConnection_crossClusterSearchConnectionId :: (Maybe Text -> f (Maybe Text))
-> InboundCrossClusterSearchConnection
-> f InboundCrossClusterSearchConnection
inboundCrossClusterSearchConnection_crossClusterSearchConnectionId = (InboundCrossClusterSearchConnection -> Maybe Text)
-> (InboundCrossClusterSearchConnection
-> Maybe Text -> InboundCrossClusterSearchConnection)
-> Lens
InboundCrossClusterSearchConnection
InboundCrossClusterSearchConnection
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InboundCrossClusterSearchConnection' {Maybe Text
crossClusterSearchConnectionId :: Maybe Text
$sel:crossClusterSearchConnectionId:InboundCrossClusterSearchConnection' :: InboundCrossClusterSearchConnection -> Maybe Text
crossClusterSearchConnectionId} -> Maybe Text
crossClusterSearchConnectionId) (\s :: InboundCrossClusterSearchConnection
s@InboundCrossClusterSearchConnection' {} Maybe Text
a -> InboundCrossClusterSearchConnection
s {$sel:crossClusterSearchConnectionId:InboundCrossClusterSearchConnection' :: Maybe Text
crossClusterSearchConnectionId = Maybe Text
a} :: InboundCrossClusterSearchConnection)
inboundCrossClusterSearchConnection_connectionStatus :: Lens.Lens' InboundCrossClusterSearchConnection (Prelude.Maybe InboundCrossClusterSearchConnectionStatus)
inboundCrossClusterSearchConnection_connectionStatus :: (Maybe InboundCrossClusterSearchConnectionStatus
-> f (Maybe InboundCrossClusterSearchConnectionStatus))
-> InboundCrossClusterSearchConnection
-> f InboundCrossClusterSearchConnection
inboundCrossClusterSearchConnection_connectionStatus = (InboundCrossClusterSearchConnection
-> Maybe InboundCrossClusterSearchConnectionStatus)
-> (InboundCrossClusterSearchConnection
-> Maybe InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnection)
-> Lens
InboundCrossClusterSearchConnection
InboundCrossClusterSearchConnection
(Maybe InboundCrossClusterSearchConnectionStatus)
(Maybe InboundCrossClusterSearchConnectionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InboundCrossClusterSearchConnection' {Maybe InboundCrossClusterSearchConnectionStatus
connectionStatus :: Maybe InboundCrossClusterSearchConnectionStatus
$sel:connectionStatus:InboundCrossClusterSearchConnection' :: InboundCrossClusterSearchConnection
-> Maybe InboundCrossClusterSearchConnectionStatus
connectionStatus} -> Maybe InboundCrossClusterSearchConnectionStatus
connectionStatus) (\s :: InboundCrossClusterSearchConnection
s@InboundCrossClusterSearchConnection' {} Maybe InboundCrossClusterSearchConnectionStatus
a -> InboundCrossClusterSearchConnection
s {$sel:connectionStatus:InboundCrossClusterSearchConnection' :: Maybe InboundCrossClusterSearchConnectionStatus
connectionStatus = Maybe InboundCrossClusterSearchConnectionStatus
a} :: InboundCrossClusterSearchConnection)
inboundCrossClusterSearchConnection_sourceDomainInfo :: Lens.Lens' InboundCrossClusterSearchConnection (Prelude.Maybe DomainInformation)
inboundCrossClusterSearchConnection_sourceDomainInfo :: (Maybe DomainInformation -> f (Maybe DomainInformation))
-> InboundCrossClusterSearchConnection
-> f InboundCrossClusterSearchConnection
inboundCrossClusterSearchConnection_sourceDomainInfo = (InboundCrossClusterSearchConnection -> Maybe DomainInformation)
-> (InboundCrossClusterSearchConnection
-> Maybe DomainInformation -> InboundCrossClusterSearchConnection)
-> Lens
InboundCrossClusterSearchConnection
InboundCrossClusterSearchConnection
(Maybe DomainInformation)
(Maybe DomainInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InboundCrossClusterSearchConnection' {Maybe DomainInformation
sourceDomainInfo :: Maybe DomainInformation
$sel:sourceDomainInfo:InboundCrossClusterSearchConnection' :: InboundCrossClusterSearchConnection -> Maybe DomainInformation
sourceDomainInfo} -> Maybe DomainInformation
sourceDomainInfo) (\s :: InboundCrossClusterSearchConnection
s@InboundCrossClusterSearchConnection' {} Maybe DomainInformation
a -> InboundCrossClusterSearchConnection
s {$sel:sourceDomainInfo:InboundCrossClusterSearchConnection' :: Maybe DomainInformation
sourceDomainInfo = Maybe DomainInformation
a} :: InboundCrossClusterSearchConnection)
instance
Core.FromJSON
InboundCrossClusterSearchConnection
where
parseJSON :: Value -> Parser InboundCrossClusterSearchConnection
parseJSON =
String
-> (Object -> Parser InboundCrossClusterSearchConnection)
-> Value
-> Parser InboundCrossClusterSearchConnection
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InboundCrossClusterSearchConnection"
( \Object
x ->
Maybe DomainInformation
-> Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation
-> InboundCrossClusterSearchConnection
InboundCrossClusterSearchConnection'
(Maybe DomainInformation
-> Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation
-> InboundCrossClusterSearchConnection)
-> Parser (Maybe DomainInformation)
-> Parser
(Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation
-> InboundCrossClusterSearchConnection)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DomainInformation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DestinationDomainInfo")
Parser
(Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation
-> InboundCrossClusterSearchConnection)
-> Parser (Maybe Text)
-> Parser
(Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation -> InboundCrossClusterSearchConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CrossClusterSearchConnectionId")
Parser
(Maybe InboundCrossClusterSearchConnectionStatus
-> Maybe DomainInformation -> InboundCrossClusterSearchConnection)
-> Parser (Maybe InboundCrossClusterSearchConnectionStatus)
-> Parser
(Maybe DomainInformation -> InboundCrossClusterSearchConnection)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe InboundCrossClusterSearchConnectionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionStatus")
Parser
(Maybe DomainInformation -> InboundCrossClusterSearchConnection)
-> Parser (Maybe DomainInformation)
-> Parser InboundCrossClusterSearchConnection
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DomainInformation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceDomainInfo")
)
instance
Prelude.Hashable
InboundCrossClusterSearchConnection
instance
Prelude.NFData
InboundCrossClusterSearchConnection