{-# 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.SSM.Types.OpsEntityItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OpsEntityItem = OpsEntityItem'
{
OpsEntityItem -> Maybe [HashMap Text Text]
content :: Prelude.Maybe [Prelude.HashMap Prelude.Text Prelude.Text],
OpsEntityItem -> Maybe Text
captureTime :: Prelude.Maybe Prelude.Text
}
deriving (OpsEntityItem -> OpsEntityItem -> Bool
(OpsEntityItem -> OpsEntityItem -> Bool)
-> (OpsEntityItem -> OpsEntityItem -> Bool) -> Eq OpsEntityItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OpsEntityItem -> OpsEntityItem -> Bool
$c/= :: OpsEntityItem -> OpsEntityItem -> Bool
== :: OpsEntityItem -> OpsEntityItem -> Bool
$c== :: OpsEntityItem -> OpsEntityItem -> Bool
Prelude.Eq, ReadPrec [OpsEntityItem]
ReadPrec OpsEntityItem
Int -> ReadS OpsEntityItem
ReadS [OpsEntityItem]
(Int -> ReadS OpsEntityItem)
-> ReadS [OpsEntityItem]
-> ReadPrec OpsEntityItem
-> ReadPrec [OpsEntityItem]
-> Read OpsEntityItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OpsEntityItem]
$creadListPrec :: ReadPrec [OpsEntityItem]
readPrec :: ReadPrec OpsEntityItem
$creadPrec :: ReadPrec OpsEntityItem
readList :: ReadS [OpsEntityItem]
$creadList :: ReadS [OpsEntityItem]
readsPrec :: Int -> ReadS OpsEntityItem
$creadsPrec :: Int -> ReadS OpsEntityItem
Prelude.Read, Int -> OpsEntityItem -> ShowS
[OpsEntityItem] -> ShowS
OpsEntityItem -> String
(Int -> OpsEntityItem -> ShowS)
-> (OpsEntityItem -> String)
-> ([OpsEntityItem] -> ShowS)
-> Show OpsEntityItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OpsEntityItem] -> ShowS
$cshowList :: [OpsEntityItem] -> ShowS
show :: OpsEntityItem -> String
$cshow :: OpsEntityItem -> String
showsPrec :: Int -> OpsEntityItem -> ShowS
$cshowsPrec :: Int -> OpsEntityItem -> ShowS
Prelude.Show, (forall x. OpsEntityItem -> Rep OpsEntityItem x)
-> (forall x. Rep OpsEntityItem x -> OpsEntityItem)
-> Generic OpsEntityItem
forall x. Rep OpsEntityItem x -> OpsEntityItem
forall x. OpsEntityItem -> Rep OpsEntityItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OpsEntityItem x -> OpsEntityItem
$cfrom :: forall x. OpsEntityItem -> Rep OpsEntityItem x
Prelude.Generic)
newOpsEntityItem ::
OpsEntityItem
newOpsEntityItem :: OpsEntityItem
newOpsEntityItem =
OpsEntityItem' :: Maybe [HashMap Text Text] -> Maybe Text -> OpsEntityItem
OpsEntityItem'
{ $sel:content:OpsEntityItem' :: Maybe [HashMap Text Text]
content = Maybe [HashMap Text Text]
forall a. Maybe a
Prelude.Nothing,
$sel:captureTime:OpsEntityItem' :: Maybe Text
captureTime = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
opsEntityItem_content :: Lens.Lens' OpsEntityItem (Prelude.Maybe [Prelude.HashMap Prelude.Text Prelude.Text])
opsEntityItem_content :: (Maybe [HashMap Text Text] -> f (Maybe [HashMap Text Text]))
-> OpsEntityItem -> f OpsEntityItem
opsEntityItem_content = (OpsEntityItem -> Maybe [HashMap Text Text])
-> (OpsEntityItem -> Maybe [HashMap Text Text] -> OpsEntityItem)
-> Lens
OpsEntityItem
OpsEntityItem
(Maybe [HashMap Text Text])
(Maybe [HashMap Text Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsEntityItem' {Maybe [HashMap Text Text]
content :: Maybe [HashMap Text Text]
$sel:content:OpsEntityItem' :: OpsEntityItem -> Maybe [HashMap Text Text]
content} -> Maybe [HashMap Text Text]
content) (\s :: OpsEntityItem
s@OpsEntityItem' {} Maybe [HashMap Text Text]
a -> OpsEntityItem
s {$sel:content:OpsEntityItem' :: Maybe [HashMap Text Text]
content = Maybe [HashMap Text Text]
a} :: OpsEntityItem) ((Maybe [HashMap Text Text] -> f (Maybe [HashMap Text Text]))
-> OpsEntityItem -> f OpsEntityItem)
-> ((Maybe [HashMap Text Text] -> f (Maybe [HashMap Text Text]))
-> Maybe [HashMap Text Text] -> f (Maybe [HashMap Text Text]))
-> (Maybe [HashMap Text Text] -> f (Maybe [HashMap Text Text]))
-> OpsEntityItem
-> f OpsEntityItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[HashMap Text Text]
[HashMap Text Text]
[HashMap Text Text]
[HashMap Text Text]
-> Iso
(Maybe [HashMap Text Text])
(Maybe [HashMap Text Text])
(Maybe [HashMap Text Text])
(Maybe [HashMap Text Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[HashMap Text Text]
[HashMap Text Text]
[HashMap Text Text]
[HashMap Text Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
opsEntityItem_captureTime :: Lens.Lens' OpsEntityItem (Prelude.Maybe Prelude.Text)
opsEntityItem_captureTime :: (Maybe Text -> f (Maybe Text)) -> OpsEntityItem -> f OpsEntityItem
opsEntityItem_captureTime = (OpsEntityItem -> Maybe Text)
-> (OpsEntityItem -> Maybe Text -> OpsEntityItem)
-> Lens OpsEntityItem OpsEntityItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OpsEntityItem' {Maybe Text
captureTime :: Maybe Text
$sel:captureTime:OpsEntityItem' :: OpsEntityItem -> Maybe Text
captureTime} -> Maybe Text
captureTime) (\s :: OpsEntityItem
s@OpsEntityItem' {} Maybe Text
a -> OpsEntityItem
s {$sel:captureTime:OpsEntityItem' :: Maybe Text
captureTime = Maybe Text
a} :: OpsEntityItem)
instance Core.FromJSON OpsEntityItem where
parseJSON :: Value -> Parser OpsEntityItem
parseJSON =
String
-> (Object -> Parser OpsEntityItem)
-> Value
-> Parser OpsEntityItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OpsEntityItem"
( \Object
x ->
Maybe [HashMap Text Text] -> Maybe Text -> OpsEntityItem
OpsEntityItem'
(Maybe [HashMap Text Text] -> Maybe Text -> OpsEntityItem)
-> Parser (Maybe [HashMap Text Text])
-> Parser (Maybe Text -> OpsEntityItem)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [HashMap Text Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Content" Parser (Maybe (Maybe [HashMap Text Text]))
-> Maybe [HashMap Text Text] -> Parser (Maybe [HashMap Text Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [HashMap Text Text]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> OpsEntityItem)
-> Parser (Maybe Text) -> Parser OpsEntityItem
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
"CaptureTime")
)
instance Prelude.Hashable OpsEntityItem
instance Prelude.NFData OpsEntityItem