{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data OpsEntityItem = OpsEntityItem'
{
OpsEntityItem -> Maybe Text
captureTime :: Prelude.Maybe Prelude.Text,
OpsEntityItem -> Maybe [HashMap Text Text]
content :: Prelude.Maybe [Prelude.HashMap Prelude.Text Prelude.Text]
}
deriving (OpsEntityItem -> OpsEntityItem -> Bool
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]
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
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. 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'
{ $sel:captureTime:OpsEntityItem' :: Maybe Text
captureTime = forall a. Maybe a
Prelude.Nothing,
$sel:content:OpsEntityItem' :: Maybe [HashMap Text Text]
content = forall a. Maybe a
Prelude.Nothing
}
opsEntityItem_captureTime :: Lens.Lens' OpsEntityItem (Prelude.Maybe Prelude.Text)
opsEntityItem_captureTime :: Lens' OpsEntityItem (Maybe Text)
opsEntityItem_captureTime = 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)
opsEntityItem_content :: Lens.Lens' OpsEntityItem (Prelude.Maybe [Prelude.HashMap Prelude.Text Prelude.Text])
opsEntityItem_content :: Lens' OpsEntityItem (Maybe [HashMap Text Text])
opsEntityItem_content = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON OpsEntityItem where
parseJSON :: Value -> Parser OpsEntityItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OpsEntityItem"
( \Object
x ->
Maybe Text -> Maybe [HashMap Text Text] -> OpsEntityItem
OpsEntityItem'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CaptureTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Content" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable OpsEntityItem where
hashWithSalt :: Int -> OpsEntityItem -> Int
hashWithSalt Int
_salt OpsEntityItem' {Maybe [HashMap Text Text]
Maybe Text
content :: Maybe [HashMap Text Text]
captureTime :: Maybe Text
$sel:content:OpsEntityItem' :: OpsEntityItem -> Maybe [HashMap Text Text]
$sel:captureTime:OpsEntityItem' :: OpsEntityItem -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
captureTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [HashMap Text Text]
content
instance Prelude.NFData OpsEntityItem where
rnf :: OpsEntityItem -> ()
rnf OpsEntityItem' {Maybe [HashMap Text Text]
Maybe Text
content :: Maybe [HashMap Text Text]
captureTime :: Maybe Text
$sel:content:OpsEntityItem' :: OpsEntityItem -> Maybe [HashMap Text Text]
$sel:captureTime:OpsEntityItem' :: OpsEntityItem -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
captureTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [HashMap Text Text]
content