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