{-# 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.Inspector2.Types.Ec2InstanceAggregationResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Inspector2.Types.SeverityCounts
import qualified Amazonka.Prelude as Prelude
data Ec2InstanceAggregationResponse = Ec2InstanceAggregationResponse'
{
Ec2InstanceAggregationResponse -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
Ec2InstanceAggregationResponse -> Maybe Text
ami :: Prelude.Maybe Prelude.Text,
Ec2InstanceAggregationResponse -> Maybe (HashMap Text Text)
instanceTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Ec2InstanceAggregationResponse -> Maybe Integer
networkFindings :: Prelude.Maybe Prelude.Integer,
Ec2InstanceAggregationResponse -> Maybe Text
operatingSystem :: Prelude.Maybe Prelude.Text,
Ec2InstanceAggregationResponse -> Maybe SeverityCounts
severityCounts :: Prelude.Maybe SeverityCounts,
Ec2InstanceAggregationResponse -> Text
instanceId :: Prelude.Text
}
deriving (Ec2InstanceAggregationResponse
-> Ec2InstanceAggregationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ec2InstanceAggregationResponse
-> Ec2InstanceAggregationResponse -> Bool
$c/= :: Ec2InstanceAggregationResponse
-> Ec2InstanceAggregationResponse -> Bool
== :: Ec2InstanceAggregationResponse
-> Ec2InstanceAggregationResponse -> Bool
$c== :: Ec2InstanceAggregationResponse
-> Ec2InstanceAggregationResponse -> Bool
Prelude.Eq, ReadPrec [Ec2InstanceAggregationResponse]
ReadPrec Ec2InstanceAggregationResponse
Int -> ReadS Ec2InstanceAggregationResponse
ReadS [Ec2InstanceAggregationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ec2InstanceAggregationResponse]
$creadListPrec :: ReadPrec [Ec2InstanceAggregationResponse]
readPrec :: ReadPrec Ec2InstanceAggregationResponse
$creadPrec :: ReadPrec Ec2InstanceAggregationResponse
readList :: ReadS [Ec2InstanceAggregationResponse]
$creadList :: ReadS [Ec2InstanceAggregationResponse]
readsPrec :: Int -> ReadS Ec2InstanceAggregationResponse
$creadsPrec :: Int -> ReadS Ec2InstanceAggregationResponse
Prelude.Read, Int -> Ec2InstanceAggregationResponse -> ShowS
[Ec2InstanceAggregationResponse] -> ShowS
Ec2InstanceAggregationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ec2InstanceAggregationResponse] -> ShowS
$cshowList :: [Ec2InstanceAggregationResponse] -> ShowS
show :: Ec2InstanceAggregationResponse -> String
$cshow :: Ec2InstanceAggregationResponse -> String
showsPrec :: Int -> Ec2InstanceAggregationResponse -> ShowS
$cshowsPrec :: Int -> Ec2InstanceAggregationResponse -> ShowS
Prelude.Show, forall x.
Rep Ec2InstanceAggregationResponse x
-> Ec2InstanceAggregationResponse
forall x.
Ec2InstanceAggregationResponse
-> Rep Ec2InstanceAggregationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Ec2InstanceAggregationResponse x
-> Ec2InstanceAggregationResponse
$cfrom :: forall x.
Ec2InstanceAggregationResponse
-> Rep Ec2InstanceAggregationResponse x
Prelude.Generic)
newEc2InstanceAggregationResponse ::
Prelude.Text ->
Ec2InstanceAggregationResponse
newEc2InstanceAggregationResponse :: Text -> Ec2InstanceAggregationResponse
newEc2InstanceAggregationResponse Text
pInstanceId_ =
Ec2InstanceAggregationResponse'
{ $sel:accountId:Ec2InstanceAggregationResponse' :: Maybe Text
accountId =
forall a. Maybe a
Prelude.Nothing,
$sel:ami:Ec2InstanceAggregationResponse' :: Maybe Text
ami = forall a. Maybe a
Prelude.Nothing,
$sel:instanceTags:Ec2InstanceAggregationResponse' :: Maybe (HashMap Text Text)
instanceTags = forall a. Maybe a
Prelude.Nothing,
$sel:networkFindings:Ec2InstanceAggregationResponse' :: Maybe Integer
networkFindings = forall a. Maybe a
Prelude.Nothing,
$sel:operatingSystem:Ec2InstanceAggregationResponse' :: Maybe Text
operatingSystem = forall a. Maybe a
Prelude.Nothing,
$sel:severityCounts:Ec2InstanceAggregationResponse' :: Maybe SeverityCounts
severityCounts = forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:Ec2InstanceAggregationResponse' :: Text
instanceId = Text
pInstanceId_
}
ec2InstanceAggregationResponse_accountId :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Text)
ec2InstanceAggregationResponse_accountId :: Lens' Ec2InstanceAggregationResponse (Maybe Text)
ec2InstanceAggregationResponse_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Maybe Text
accountId :: Maybe Text
$sel:accountId:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Maybe Text
a -> Ec2InstanceAggregationResponse
s {$sel:accountId:Ec2InstanceAggregationResponse' :: Maybe Text
accountId = Maybe Text
a} :: Ec2InstanceAggregationResponse)
ec2InstanceAggregationResponse_ami :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Text)
ec2InstanceAggregationResponse_ami :: Lens' Ec2InstanceAggregationResponse (Maybe Text)
ec2InstanceAggregationResponse_ami = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Maybe Text
ami :: Maybe Text
$sel:ami:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
ami} -> Maybe Text
ami) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Maybe Text
a -> Ec2InstanceAggregationResponse
s {$sel:ami:Ec2InstanceAggregationResponse' :: Maybe Text
ami = Maybe Text
a} :: Ec2InstanceAggregationResponse)
ec2InstanceAggregationResponse_instanceTags :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
ec2InstanceAggregationResponse_instanceTags :: Lens' Ec2InstanceAggregationResponse (Maybe (HashMap Text Text))
ec2InstanceAggregationResponse_instanceTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Maybe (HashMap Text Text)
instanceTags :: Maybe (HashMap Text Text)
$sel:instanceTags:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe (HashMap Text Text)
instanceTags} -> Maybe (HashMap Text Text)
instanceTags) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Maybe (HashMap Text Text)
a -> Ec2InstanceAggregationResponse
s {$sel:instanceTags:Ec2InstanceAggregationResponse' :: Maybe (HashMap Text Text)
instanceTags = Maybe (HashMap Text Text)
a} :: Ec2InstanceAggregationResponse) 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
ec2InstanceAggregationResponse_networkFindings :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Integer)
ec2InstanceAggregationResponse_networkFindings :: Lens' Ec2InstanceAggregationResponse (Maybe Integer)
ec2InstanceAggregationResponse_networkFindings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Maybe Integer
networkFindings :: Maybe Integer
$sel:networkFindings:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Integer
networkFindings} -> Maybe Integer
networkFindings) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Maybe Integer
a -> Ec2InstanceAggregationResponse
s {$sel:networkFindings:Ec2InstanceAggregationResponse' :: Maybe Integer
networkFindings = Maybe Integer
a} :: Ec2InstanceAggregationResponse)
ec2InstanceAggregationResponse_operatingSystem :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe Prelude.Text)
ec2InstanceAggregationResponse_operatingSystem :: Lens' Ec2InstanceAggregationResponse (Maybe Text)
ec2InstanceAggregationResponse_operatingSystem = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Maybe Text
operatingSystem :: Maybe Text
$sel:operatingSystem:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
operatingSystem} -> Maybe Text
operatingSystem) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Maybe Text
a -> Ec2InstanceAggregationResponse
s {$sel:operatingSystem:Ec2InstanceAggregationResponse' :: Maybe Text
operatingSystem = Maybe Text
a} :: Ec2InstanceAggregationResponse)
ec2InstanceAggregationResponse_severityCounts :: Lens.Lens' Ec2InstanceAggregationResponse (Prelude.Maybe SeverityCounts)
ec2InstanceAggregationResponse_severityCounts :: Lens' Ec2InstanceAggregationResponse (Maybe SeverityCounts)
ec2InstanceAggregationResponse_severityCounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Maybe SeverityCounts
severityCounts :: Maybe SeverityCounts
$sel:severityCounts:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe SeverityCounts
severityCounts} -> Maybe SeverityCounts
severityCounts) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Maybe SeverityCounts
a -> Ec2InstanceAggregationResponse
s {$sel:severityCounts:Ec2InstanceAggregationResponse' :: Maybe SeverityCounts
severityCounts = Maybe SeverityCounts
a} :: Ec2InstanceAggregationResponse)
ec2InstanceAggregationResponse_instanceId :: Lens.Lens' Ec2InstanceAggregationResponse Prelude.Text
ec2InstanceAggregationResponse_instanceId :: Lens' Ec2InstanceAggregationResponse Text
ec2InstanceAggregationResponse_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ec2InstanceAggregationResponse' {Text
instanceId :: Text
$sel:instanceId:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Text
instanceId} -> Text
instanceId) (\s :: Ec2InstanceAggregationResponse
s@Ec2InstanceAggregationResponse' {} Text
a -> Ec2InstanceAggregationResponse
s {$sel:instanceId:Ec2InstanceAggregationResponse' :: Text
instanceId = Text
a} :: Ec2InstanceAggregationResponse)
instance Data.FromJSON Ec2InstanceAggregationResponse where
parseJSON :: Value -> Parser Ec2InstanceAggregationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Ec2InstanceAggregationResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Integer
-> Maybe Text
-> Maybe SeverityCounts
-> Text
-> Ec2InstanceAggregationResponse
Ec2InstanceAggregationResponse'
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
"accountId")
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
"ami")
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
"instanceTags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"networkFindings")
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
"operatingSystem")
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
"severityCounts")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"instanceId")
)
instance
Prelude.Hashable
Ec2InstanceAggregationResponse
where
hashWithSalt :: Int -> Ec2InstanceAggregationResponse -> Int
hashWithSalt
Int
_salt
Ec2InstanceAggregationResponse' {Maybe Integer
Maybe Text
Maybe (HashMap Text Text)
Maybe SeverityCounts
Text
instanceId :: Text
severityCounts :: Maybe SeverityCounts
operatingSystem :: Maybe Text
networkFindings :: Maybe Integer
instanceTags :: Maybe (HashMap Text Text)
ami :: Maybe Text
accountId :: Maybe Text
$sel:instanceId:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Text
$sel:severityCounts:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe SeverityCounts
$sel:operatingSystem:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
$sel:networkFindings:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Integer
$sel:instanceTags:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe (HashMap Text Text)
$sel:ami:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
$sel:accountId:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ami
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
instanceTags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
networkFindings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operatingSystem
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SeverityCounts
severityCounts
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
instance
Prelude.NFData
Ec2InstanceAggregationResponse
where
rnf :: Ec2InstanceAggregationResponse -> ()
rnf Ec2InstanceAggregationResponse' {Maybe Integer
Maybe Text
Maybe (HashMap Text Text)
Maybe SeverityCounts
Text
instanceId :: Text
severityCounts :: Maybe SeverityCounts
operatingSystem :: Maybe Text
networkFindings :: Maybe Integer
instanceTags :: Maybe (HashMap Text Text)
ami :: Maybe Text
accountId :: Maybe Text
$sel:instanceId:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Text
$sel:severityCounts:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe SeverityCounts
$sel:operatingSystem:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
$sel:networkFindings:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Integer
$sel:instanceTags:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe (HashMap Text Text)
$sel:ami:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
$sel:accountId:Ec2InstanceAggregationResponse' :: Ec2InstanceAggregationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ami
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
instanceTags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
networkFindings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operatingSystem
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SeverityCounts
severityCounts
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId