{-# 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.InboundCrossClusterSearchConnectionStatus where
import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.InboundCrossClusterSearchConnectionStatusCode
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InboundCrossClusterSearchConnectionStatus = InboundCrossClusterSearchConnectionStatus'
{
InboundCrossClusterSearchConnectionStatus -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
InboundCrossClusterSearchConnectionStatus
-> Maybe InboundCrossClusterSearchConnectionStatusCode
statusCode :: Prelude.Maybe InboundCrossClusterSearchConnectionStatusCode
}
deriving (InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool
(InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool)
-> (InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool)
-> Eq InboundCrossClusterSearchConnectionStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool
$c/= :: InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool
== :: InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool
$c== :: InboundCrossClusterSearchConnectionStatus
-> InboundCrossClusterSearchConnectionStatus -> Bool
Prelude.Eq, ReadPrec [InboundCrossClusterSearchConnectionStatus]
ReadPrec InboundCrossClusterSearchConnectionStatus
Int -> ReadS InboundCrossClusterSearchConnectionStatus
ReadS [InboundCrossClusterSearchConnectionStatus]
(Int -> ReadS InboundCrossClusterSearchConnectionStatus)
-> ReadS [InboundCrossClusterSearchConnectionStatus]
-> ReadPrec InboundCrossClusterSearchConnectionStatus
-> ReadPrec [InboundCrossClusterSearchConnectionStatus]
-> Read InboundCrossClusterSearchConnectionStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InboundCrossClusterSearchConnectionStatus]
$creadListPrec :: ReadPrec [InboundCrossClusterSearchConnectionStatus]
readPrec :: ReadPrec InboundCrossClusterSearchConnectionStatus
$creadPrec :: ReadPrec InboundCrossClusterSearchConnectionStatus
readList :: ReadS [InboundCrossClusterSearchConnectionStatus]
$creadList :: ReadS [InboundCrossClusterSearchConnectionStatus]
readsPrec :: Int -> ReadS InboundCrossClusterSearchConnectionStatus
$creadsPrec :: Int -> ReadS InboundCrossClusterSearchConnectionStatus
Prelude.Read, Int -> InboundCrossClusterSearchConnectionStatus -> ShowS
[InboundCrossClusterSearchConnectionStatus] -> ShowS
InboundCrossClusterSearchConnectionStatus -> String
(Int -> InboundCrossClusterSearchConnectionStatus -> ShowS)
-> (InboundCrossClusterSearchConnectionStatus -> String)
-> ([InboundCrossClusterSearchConnectionStatus] -> ShowS)
-> Show InboundCrossClusterSearchConnectionStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InboundCrossClusterSearchConnectionStatus] -> ShowS
$cshowList :: [InboundCrossClusterSearchConnectionStatus] -> ShowS
show :: InboundCrossClusterSearchConnectionStatus -> String
$cshow :: InboundCrossClusterSearchConnectionStatus -> String
showsPrec :: Int -> InboundCrossClusterSearchConnectionStatus -> ShowS
$cshowsPrec :: Int -> InboundCrossClusterSearchConnectionStatus -> ShowS
Prelude.Show, (forall x.
InboundCrossClusterSearchConnectionStatus
-> Rep InboundCrossClusterSearchConnectionStatus x)
-> (forall x.
Rep InboundCrossClusterSearchConnectionStatus x
-> InboundCrossClusterSearchConnectionStatus)
-> Generic InboundCrossClusterSearchConnectionStatus
forall x.
Rep InboundCrossClusterSearchConnectionStatus x
-> InboundCrossClusterSearchConnectionStatus
forall x.
InboundCrossClusterSearchConnectionStatus
-> Rep InboundCrossClusterSearchConnectionStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InboundCrossClusterSearchConnectionStatus x
-> InboundCrossClusterSearchConnectionStatus
$cfrom :: forall x.
InboundCrossClusterSearchConnectionStatus
-> Rep InboundCrossClusterSearchConnectionStatus x
Prelude.Generic)
newInboundCrossClusterSearchConnectionStatus ::
InboundCrossClusterSearchConnectionStatus
newInboundCrossClusterSearchConnectionStatus :: InboundCrossClusterSearchConnectionStatus
newInboundCrossClusterSearchConnectionStatus =
InboundCrossClusterSearchConnectionStatus' :: Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatusCode
-> InboundCrossClusterSearchConnectionStatus
InboundCrossClusterSearchConnectionStatus'
{ $sel:message:InboundCrossClusterSearchConnectionStatus' :: Maybe Text
message =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusCode:InboundCrossClusterSearchConnectionStatus' :: Maybe InboundCrossClusterSearchConnectionStatusCode
statusCode = Maybe InboundCrossClusterSearchConnectionStatusCode
forall a. Maybe a
Prelude.Nothing
}
inboundCrossClusterSearchConnectionStatus_message :: Lens.Lens' InboundCrossClusterSearchConnectionStatus (Prelude.Maybe Prelude.Text)
inboundCrossClusterSearchConnectionStatus_message :: (Maybe Text -> f (Maybe Text))
-> InboundCrossClusterSearchConnectionStatus
-> f InboundCrossClusterSearchConnectionStatus
inboundCrossClusterSearchConnectionStatus_message = (InboundCrossClusterSearchConnectionStatus -> Maybe Text)
-> (InboundCrossClusterSearchConnectionStatus
-> Maybe Text -> InboundCrossClusterSearchConnectionStatus)
-> Lens
InboundCrossClusterSearchConnectionStatus
InboundCrossClusterSearchConnectionStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InboundCrossClusterSearchConnectionStatus' {Maybe Text
message :: Maybe Text
$sel:message:InboundCrossClusterSearchConnectionStatus' :: InboundCrossClusterSearchConnectionStatus -> Maybe Text
message} -> Maybe Text
message) (\s :: InboundCrossClusterSearchConnectionStatus
s@InboundCrossClusterSearchConnectionStatus' {} Maybe Text
a -> InboundCrossClusterSearchConnectionStatus
s {$sel:message:InboundCrossClusterSearchConnectionStatus' :: Maybe Text
message = Maybe Text
a} :: InboundCrossClusterSearchConnectionStatus)
inboundCrossClusterSearchConnectionStatus_statusCode :: Lens.Lens' InboundCrossClusterSearchConnectionStatus (Prelude.Maybe InboundCrossClusterSearchConnectionStatusCode)
inboundCrossClusterSearchConnectionStatus_statusCode :: (Maybe InboundCrossClusterSearchConnectionStatusCode
-> f (Maybe InboundCrossClusterSearchConnectionStatusCode))
-> InboundCrossClusterSearchConnectionStatus
-> f InboundCrossClusterSearchConnectionStatus
inboundCrossClusterSearchConnectionStatus_statusCode = (InboundCrossClusterSearchConnectionStatus
-> Maybe InboundCrossClusterSearchConnectionStatusCode)
-> (InboundCrossClusterSearchConnectionStatus
-> Maybe InboundCrossClusterSearchConnectionStatusCode
-> InboundCrossClusterSearchConnectionStatus)
-> Lens
InboundCrossClusterSearchConnectionStatus
InboundCrossClusterSearchConnectionStatus
(Maybe InboundCrossClusterSearchConnectionStatusCode)
(Maybe InboundCrossClusterSearchConnectionStatusCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InboundCrossClusterSearchConnectionStatus' {Maybe InboundCrossClusterSearchConnectionStatusCode
statusCode :: Maybe InboundCrossClusterSearchConnectionStatusCode
$sel:statusCode:InboundCrossClusterSearchConnectionStatus' :: InboundCrossClusterSearchConnectionStatus
-> Maybe InboundCrossClusterSearchConnectionStatusCode
statusCode} -> Maybe InboundCrossClusterSearchConnectionStatusCode
statusCode) (\s :: InboundCrossClusterSearchConnectionStatus
s@InboundCrossClusterSearchConnectionStatus' {} Maybe InboundCrossClusterSearchConnectionStatusCode
a -> InboundCrossClusterSearchConnectionStatus
s {$sel:statusCode:InboundCrossClusterSearchConnectionStatus' :: Maybe InboundCrossClusterSearchConnectionStatusCode
statusCode = Maybe InboundCrossClusterSearchConnectionStatusCode
a} :: InboundCrossClusterSearchConnectionStatus)
instance
Core.FromJSON
InboundCrossClusterSearchConnectionStatus
where
parseJSON :: Value -> Parser InboundCrossClusterSearchConnectionStatus
parseJSON =
String
-> (Object -> Parser InboundCrossClusterSearchConnectionStatus)
-> Value
-> Parser InboundCrossClusterSearchConnectionStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InboundCrossClusterSearchConnectionStatus"
( \Object
x ->
Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatusCode
-> InboundCrossClusterSearchConnectionStatus
InboundCrossClusterSearchConnectionStatus'
(Maybe Text
-> Maybe InboundCrossClusterSearchConnectionStatusCode
-> InboundCrossClusterSearchConnectionStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe InboundCrossClusterSearchConnectionStatusCode
-> InboundCrossClusterSearchConnectionStatus)
forall (f :: * -> *) a b. Functor 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
"Message")
Parser
(Maybe InboundCrossClusterSearchConnectionStatusCode
-> InboundCrossClusterSearchConnectionStatus)
-> Parser (Maybe InboundCrossClusterSearchConnectionStatusCode)
-> Parser InboundCrossClusterSearchConnectionStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe InboundCrossClusterSearchConnectionStatusCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusCode")
)
instance
Prelude.Hashable
InboundCrossClusterSearchConnectionStatus
instance
Prelude.NFData
InboundCrossClusterSearchConnectionStatus