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