{-# 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.MigrationHubStrategy.Types.ApplicationComponentSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubStrategy.Types.AppType
import qualified Amazonka.Prelude as Prelude
data ApplicationComponentSummary = ApplicationComponentSummary'
{
ApplicationComponentSummary -> Maybe AppType
appType :: Prelude.Maybe AppType,
ApplicationComponentSummary -> Maybe Int
count :: Prelude.Maybe Prelude.Int
}
deriving (ApplicationComponentSummary -> ApplicationComponentSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationComponentSummary -> ApplicationComponentSummary -> Bool
$c/= :: ApplicationComponentSummary -> ApplicationComponentSummary -> Bool
== :: ApplicationComponentSummary -> ApplicationComponentSummary -> Bool
$c== :: ApplicationComponentSummary -> ApplicationComponentSummary -> Bool
Prelude.Eq, ReadPrec [ApplicationComponentSummary]
ReadPrec ApplicationComponentSummary
Int -> ReadS ApplicationComponentSummary
ReadS [ApplicationComponentSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationComponentSummary]
$creadListPrec :: ReadPrec [ApplicationComponentSummary]
readPrec :: ReadPrec ApplicationComponentSummary
$creadPrec :: ReadPrec ApplicationComponentSummary
readList :: ReadS [ApplicationComponentSummary]
$creadList :: ReadS [ApplicationComponentSummary]
readsPrec :: Int -> ReadS ApplicationComponentSummary
$creadsPrec :: Int -> ReadS ApplicationComponentSummary
Prelude.Read, Int -> ApplicationComponentSummary -> ShowS
[ApplicationComponentSummary] -> ShowS
ApplicationComponentSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationComponentSummary] -> ShowS
$cshowList :: [ApplicationComponentSummary] -> ShowS
show :: ApplicationComponentSummary -> String
$cshow :: ApplicationComponentSummary -> String
showsPrec :: Int -> ApplicationComponentSummary -> ShowS
$cshowsPrec :: Int -> ApplicationComponentSummary -> ShowS
Prelude.Show, forall x.
Rep ApplicationComponentSummary x -> ApplicationComponentSummary
forall x.
ApplicationComponentSummary -> Rep ApplicationComponentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationComponentSummary x -> ApplicationComponentSummary
$cfrom :: forall x.
ApplicationComponentSummary -> Rep ApplicationComponentSummary x
Prelude.Generic)
newApplicationComponentSummary ::
ApplicationComponentSummary
newApplicationComponentSummary :: ApplicationComponentSummary
newApplicationComponentSummary =
ApplicationComponentSummary'
{ $sel:appType:ApplicationComponentSummary' :: Maybe AppType
appType =
forall a. Maybe a
Prelude.Nothing,
$sel:count:ApplicationComponentSummary' :: Maybe Int
count = forall a. Maybe a
Prelude.Nothing
}
applicationComponentSummary_appType :: Lens.Lens' ApplicationComponentSummary (Prelude.Maybe AppType)
applicationComponentSummary_appType :: Lens' ApplicationComponentSummary (Maybe AppType)
applicationComponentSummary_appType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationComponentSummary' {Maybe AppType
appType :: Maybe AppType
$sel:appType:ApplicationComponentSummary' :: ApplicationComponentSummary -> Maybe AppType
appType} -> Maybe AppType
appType) (\s :: ApplicationComponentSummary
s@ApplicationComponentSummary' {} Maybe AppType
a -> ApplicationComponentSummary
s {$sel:appType:ApplicationComponentSummary' :: Maybe AppType
appType = Maybe AppType
a} :: ApplicationComponentSummary)
applicationComponentSummary_count :: Lens.Lens' ApplicationComponentSummary (Prelude.Maybe Prelude.Int)
applicationComponentSummary_count :: Lens' ApplicationComponentSummary (Maybe Int)
applicationComponentSummary_count = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationComponentSummary' {Maybe Int
count :: Maybe Int
$sel:count:ApplicationComponentSummary' :: ApplicationComponentSummary -> Maybe Int
count} -> Maybe Int
count) (\s :: ApplicationComponentSummary
s@ApplicationComponentSummary' {} Maybe Int
a -> ApplicationComponentSummary
s {$sel:count:ApplicationComponentSummary' :: Maybe Int
count = Maybe Int
a} :: ApplicationComponentSummary)
instance Data.FromJSON ApplicationComponentSummary where
parseJSON :: Value -> Parser ApplicationComponentSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ApplicationComponentSummary"
( \Object
x ->
Maybe AppType -> Maybe Int -> ApplicationComponentSummary
ApplicationComponentSummary'
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
"appType")
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
"count")
)
instance Prelude.Hashable ApplicationComponentSummary where
hashWithSalt :: Int -> ApplicationComponentSummary -> Int
hashWithSalt Int
_salt ApplicationComponentSummary' {Maybe Int
Maybe AppType
count :: Maybe Int
appType :: Maybe AppType
$sel:count:ApplicationComponentSummary' :: ApplicationComponentSummary -> Maybe Int
$sel:appType:ApplicationComponentSummary' :: ApplicationComponentSummary -> Maybe AppType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppType
appType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
count
instance Prelude.NFData ApplicationComponentSummary where
rnf :: ApplicationComponentSummary -> ()
rnf ApplicationComponentSummary' {Maybe Int
Maybe AppType
count :: Maybe Int
appType :: Maybe AppType
$sel:count:ApplicationComponentSummary' :: ApplicationComponentSummary -> Maybe Int
$sel:appType:ApplicationComponentSummary' :: ApplicationComponentSummary -> Maybe AppType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AppType
appType seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
count