{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Config.Types.AggregateConformancePackComplianceCount
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Config.Types.AggregateConformancePackComplianceCount 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

-- | The number of conformance packs that are compliant and noncompliant.
--
-- /See:/ 'newAggregateConformancePackComplianceCount' smart constructor.
data AggregateConformancePackComplianceCount = AggregateConformancePackComplianceCount'
  { -- | Number of compliant conformance packs.
    AggregateConformancePackComplianceCount -> Maybe Int
compliantConformancePackCount :: Prelude.Maybe Prelude.Int,
    -- | Number of noncompliant conformance packs.
    AggregateConformancePackComplianceCount -> Maybe Int
nonCompliantConformancePackCount :: Prelude.Maybe Prelude.Int
  }
  deriving (AggregateConformancePackComplianceCount
-> AggregateConformancePackComplianceCount -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AggregateConformancePackComplianceCount
-> AggregateConformancePackComplianceCount -> Bool
$c/= :: AggregateConformancePackComplianceCount
-> AggregateConformancePackComplianceCount -> Bool
== :: AggregateConformancePackComplianceCount
-> AggregateConformancePackComplianceCount -> Bool
$c== :: AggregateConformancePackComplianceCount
-> AggregateConformancePackComplianceCount -> Bool
Prelude.Eq, ReadPrec [AggregateConformancePackComplianceCount]
ReadPrec AggregateConformancePackComplianceCount
Int -> ReadS AggregateConformancePackComplianceCount
ReadS [AggregateConformancePackComplianceCount]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AggregateConformancePackComplianceCount]
$creadListPrec :: ReadPrec [AggregateConformancePackComplianceCount]
readPrec :: ReadPrec AggregateConformancePackComplianceCount
$creadPrec :: ReadPrec AggregateConformancePackComplianceCount
readList :: ReadS [AggregateConformancePackComplianceCount]
$creadList :: ReadS [AggregateConformancePackComplianceCount]
readsPrec :: Int -> ReadS AggregateConformancePackComplianceCount
$creadsPrec :: Int -> ReadS AggregateConformancePackComplianceCount
Prelude.Read, Int -> AggregateConformancePackComplianceCount -> ShowS
[AggregateConformancePackComplianceCount] -> ShowS
AggregateConformancePackComplianceCount -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AggregateConformancePackComplianceCount] -> ShowS
$cshowList :: [AggregateConformancePackComplianceCount] -> ShowS
show :: AggregateConformancePackComplianceCount -> String
$cshow :: AggregateConformancePackComplianceCount -> String
showsPrec :: Int -> AggregateConformancePackComplianceCount -> ShowS
$cshowsPrec :: Int -> AggregateConformancePackComplianceCount -> ShowS
Prelude.Show, forall x.
Rep AggregateConformancePackComplianceCount x
-> AggregateConformancePackComplianceCount
forall x.
AggregateConformancePackComplianceCount
-> Rep AggregateConformancePackComplianceCount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AggregateConformancePackComplianceCount x
-> AggregateConformancePackComplianceCount
$cfrom :: forall x.
AggregateConformancePackComplianceCount
-> Rep AggregateConformancePackComplianceCount x
Prelude.Generic)

-- |
-- Create a value of 'AggregateConformancePackComplianceCount' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'compliantConformancePackCount', 'aggregateConformancePackComplianceCount_compliantConformancePackCount' - Number of compliant conformance packs.
--
-- 'nonCompliantConformancePackCount', 'aggregateConformancePackComplianceCount_nonCompliantConformancePackCount' - Number of noncompliant conformance packs.
newAggregateConformancePackComplianceCount ::
  AggregateConformancePackComplianceCount
newAggregateConformancePackComplianceCount :: AggregateConformancePackComplianceCount
newAggregateConformancePackComplianceCount =
  AggregateConformancePackComplianceCount'
    { $sel:compliantConformancePackCount:AggregateConformancePackComplianceCount' :: Maybe Int
compliantConformancePackCount =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nonCompliantConformancePackCount:AggregateConformancePackComplianceCount' :: Maybe Int
nonCompliantConformancePackCount =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Number of compliant conformance packs.
aggregateConformancePackComplianceCount_compliantConformancePackCount :: Lens.Lens' AggregateConformancePackComplianceCount (Prelude.Maybe Prelude.Int)
aggregateConformancePackComplianceCount_compliantConformancePackCount :: Lens' AggregateConformancePackComplianceCount (Maybe Int)
aggregateConformancePackComplianceCount_compliantConformancePackCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateConformancePackComplianceCount' {Maybe Int
compliantConformancePackCount :: Maybe Int
$sel:compliantConformancePackCount:AggregateConformancePackComplianceCount' :: AggregateConformancePackComplianceCount -> Maybe Int
compliantConformancePackCount} -> Maybe Int
compliantConformancePackCount) (\s :: AggregateConformancePackComplianceCount
s@AggregateConformancePackComplianceCount' {} Maybe Int
a -> AggregateConformancePackComplianceCount
s {$sel:compliantConformancePackCount:AggregateConformancePackComplianceCount' :: Maybe Int
compliantConformancePackCount = Maybe Int
a} :: AggregateConformancePackComplianceCount)

-- | Number of noncompliant conformance packs.
aggregateConformancePackComplianceCount_nonCompliantConformancePackCount :: Lens.Lens' AggregateConformancePackComplianceCount (Prelude.Maybe Prelude.Int)
aggregateConformancePackComplianceCount_nonCompliantConformancePackCount :: Lens' AggregateConformancePackComplianceCount (Maybe Int)
aggregateConformancePackComplianceCount_nonCompliantConformancePackCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AggregateConformancePackComplianceCount' {Maybe Int
nonCompliantConformancePackCount :: Maybe Int
$sel:nonCompliantConformancePackCount:AggregateConformancePackComplianceCount' :: AggregateConformancePackComplianceCount -> Maybe Int
nonCompliantConformancePackCount} -> Maybe Int
nonCompliantConformancePackCount) (\s :: AggregateConformancePackComplianceCount
s@AggregateConformancePackComplianceCount' {} Maybe Int
a -> AggregateConformancePackComplianceCount
s {$sel:nonCompliantConformancePackCount:AggregateConformancePackComplianceCount' :: Maybe Int
nonCompliantConformancePackCount = Maybe Int
a} :: AggregateConformancePackComplianceCount)

instance
  Data.FromJSON
    AggregateConformancePackComplianceCount
  where
  parseJSON :: Value -> Parser AggregateConformancePackComplianceCount
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AggregateConformancePackComplianceCount"
      ( \Object
x ->
          Maybe Int -> Maybe Int -> AggregateConformancePackComplianceCount
AggregateConformancePackComplianceCount'
            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
"CompliantConformancePackCount")
            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
"NonCompliantConformancePackCount")
      )

instance
  Prelude.Hashable
    AggregateConformancePackComplianceCount
  where
  hashWithSalt :: Int -> AggregateConformancePackComplianceCount -> Int
hashWithSalt
    Int
_salt
    AggregateConformancePackComplianceCount' {Maybe Int
nonCompliantConformancePackCount :: Maybe Int
compliantConformancePackCount :: Maybe Int
$sel:nonCompliantConformancePackCount:AggregateConformancePackComplianceCount' :: AggregateConformancePackComplianceCount -> Maybe Int
$sel:compliantConformancePackCount:AggregateConformancePackComplianceCount' :: AggregateConformancePackComplianceCount -> Maybe Int
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
compliantConformancePackCount
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
nonCompliantConformancePackCount

instance
  Prelude.NFData
    AggregateConformancePackComplianceCount
  where
  rnf :: AggregateConformancePackComplianceCount -> ()
rnf AggregateConformancePackComplianceCount' {Maybe Int
nonCompliantConformancePackCount :: Maybe Int
compliantConformancePackCount :: Maybe Int
$sel:nonCompliantConformancePackCount:AggregateConformancePackComplianceCount' :: AggregateConformancePackComplianceCount -> Maybe Int
$sel:compliantConformancePackCount:AggregateConformancePackComplianceCount' :: AggregateConformancePackComplianceCount -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
compliantConformancePackCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
nonCompliantConformancePackCount