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