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