{-# 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.ConformancePackComplianceSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Config.Types.ConformancePackComplianceSummary where

import Amazonka.Config.Types.ConformancePackComplianceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Summary includes the name and status of the conformance pack.
--
-- /See:/ 'newConformancePackComplianceSummary' smart constructor.
data ConformancePackComplianceSummary = ConformancePackComplianceSummary'
  { -- | The name of the conformance pack name.
    ConformancePackComplianceSummary -> Text
conformancePackName :: Prelude.Text,
    -- | The status of the conformance pack. The allowed values are @COMPLIANT@,
    -- @NON_COMPLIANT@ and @INSUFFICIENT_DATA@.
    ConformancePackComplianceSummary -> ConformancePackComplianceType
conformancePackComplianceStatus :: ConformancePackComplianceType
  }
  deriving (ConformancePackComplianceSummary
-> ConformancePackComplianceSummary -> Bool
(ConformancePackComplianceSummary
 -> ConformancePackComplianceSummary -> Bool)
-> (ConformancePackComplianceSummary
    -> ConformancePackComplianceSummary -> Bool)
-> Eq ConformancePackComplianceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConformancePackComplianceSummary
-> ConformancePackComplianceSummary -> Bool
$c/= :: ConformancePackComplianceSummary
-> ConformancePackComplianceSummary -> Bool
== :: ConformancePackComplianceSummary
-> ConformancePackComplianceSummary -> Bool
$c== :: ConformancePackComplianceSummary
-> ConformancePackComplianceSummary -> Bool
Prelude.Eq, ReadPrec [ConformancePackComplianceSummary]
ReadPrec ConformancePackComplianceSummary
Int -> ReadS ConformancePackComplianceSummary
ReadS [ConformancePackComplianceSummary]
(Int -> ReadS ConformancePackComplianceSummary)
-> ReadS [ConformancePackComplianceSummary]
-> ReadPrec ConformancePackComplianceSummary
-> ReadPrec [ConformancePackComplianceSummary]
-> Read ConformancePackComplianceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConformancePackComplianceSummary]
$creadListPrec :: ReadPrec [ConformancePackComplianceSummary]
readPrec :: ReadPrec ConformancePackComplianceSummary
$creadPrec :: ReadPrec ConformancePackComplianceSummary
readList :: ReadS [ConformancePackComplianceSummary]
$creadList :: ReadS [ConformancePackComplianceSummary]
readsPrec :: Int -> ReadS ConformancePackComplianceSummary
$creadsPrec :: Int -> ReadS ConformancePackComplianceSummary
Prelude.Read, Int -> ConformancePackComplianceSummary -> ShowS
[ConformancePackComplianceSummary] -> ShowS
ConformancePackComplianceSummary -> String
(Int -> ConformancePackComplianceSummary -> ShowS)
-> (ConformancePackComplianceSummary -> String)
-> ([ConformancePackComplianceSummary] -> ShowS)
-> Show ConformancePackComplianceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConformancePackComplianceSummary] -> ShowS
$cshowList :: [ConformancePackComplianceSummary] -> ShowS
show :: ConformancePackComplianceSummary -> String
$cshow :: ConformancePackComplianceSummary -> String
showsPrec :: Int -> ConformancePackComplianceSummary -> ShowS
$cshowsPrec :: Int -> ConformancePackComplianceSummary -> ShowS
Prelude.Show, (forall x.
 ConformancePackComplianceSummary
 -> Rep ConformancePackComplianceSummary x)
-> (forall x.
    Rep ConformancePackComplianceSummary x
    -> ConformancePackComplianceSummary)
-> Generic ConformancePackComplianceSummary
forall x.
Rep ConformancePackComplianceSummary x
-> ConformancePackComplianceSummary
forall x.
ConformancePackComplianceSummary
-> Rep ConformancePackComplianceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConformancePackComplianceSummary x
-> ConformancePackComplianceSummary
$cfrom :: forall x.
ConformancePackComplianceSummary
-> Rep ConformancePackComplianceSummary x
Prelude.Generic)

-- |
-- Create a value of 'ConformancePackComplianceSummary' 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:
--
-- 'conformancePackName', 'conformancePackComplianceSummary_conformancePackName' - The name of the conformance pack name.
--
-- 'conformancePackComplianceStatus', 'conformancePackComplianceSummary_conformancePackComplianceStatus' - The status of the conformance pack. The allowed values are @COMPLIANT@,
-- @NON_COMPLIANT@ and @INSUFFICIENT_DATA@.
newConformancePackComplianceSummary ::
  -- | 'conformancePackName'
  Prelude.Text ->
  -- | 'conformancePackComplianceStatus'
  ConformancePackComplianceType ->
  ConformancePackComplianceSummary
newConformancePackComplianceSummary :: Text
-> ConformancePackComplianceType
-> ConformancePackComplianceSummary
newConformancePackComplianceSummary
  Text
pConformancePackName_
  ConformancePackComplianceType
pConformancePackComplianceStatus_ =
    ConformancePackComplianceSummary' :: Text
-> ConformancePackComplianceType
-> ConformancePackComplianceSummary
ConformancePackComplianceSummary'
      { $sel:conformancePackName:ConformancePackComplianceSummary' :: Text
conformancePackName =
          Text
pConformancePackName_,
        $sel:conformancePackComplianceStatus:ConformancePackComplianceSummary' :: ConformancePackComplianceType
conformancePackComplianceStatus =
          ConformancePackComplianceType
pConformancePackComplianceStatus_
      }

-- | The name of the conformance pack name.
conformancePackComplianceSummary_conformancePackName :: Lens.Lens' ConformancePackComplianceSummary Prelude.Text
conformancePackComplianceSummary_conformancePackName :: (Text -> f Text)
-> ConformancePackComplianceSummary
-> f ConformancePackComplianceSummary
conformancePackComplianceSummary_conformancePackName = (ConformancePackComplianceSummary -> Text)
-> (ConformancePackComplianceSummary
    -> Text -> ConformancePackComplianceSummary)
-> Lens
     ConformancePackComplianceSummary
     ConformancePackComplianceSummary
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackComplianceSummary' {Text
conformancePackName :: Text
$sel:conformancePackName:ConformancePackComplianceSummary' :: ConformancePackComplianceSummary -> Text
conformancePackName} -> Text
conformancePackName) (\s :: ConformancePackComplianceSummary
s@ConformancePackComplianceSummary' {} Text
a -> ConformancePackComplianceSummary
s {$sel:conformancePackName:ConformancePackComplianceSummary' :: Text
conformancePackName = Text
a} :: ConformancePackComplianceSummary)

-- | The status of the conformance pack. The allowed values are @COMPLIANT@,
-- @NON_COMPLIANT@ and @INSUFFICIENT_DATA@.
conformancePackComplianceSummary_conformancePackComplianceStatus :: Lens.Lens' ConformancePackComplianceSummary ConformancePackComplianceType
conformancePackComplianceSummary_conformancePackComplianceStatus :: (ConformancePackComplianceType -> f ConformancePackComplianceType)
-> ConformancePackComplianceSummary
-> f ConformancePackComplianceSummary
conformancePackComplianceSummary_conformancePackComplianceStatus = (ConformancePackComplianceSummary -> ConformancePackComplianceType)
-> (ConformancePackComplianceSummary
    -> ConformancePackComplianceType
    -> ConformancePackComplianceSummary)
-> Lens
     ConformancePackComplianceSummary
     ConformancePackComplianceSummary
     ConformancePackComplianceType
     ConformancePackComplianceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackComplianceSummary' {ConformancePackComplianceType
conformancePackComplianceStatus :: ConformancePackComplianceType
$sel:conformancePackComplianceStatus:ConformancePackComplianceSummary' :: ConformancePackComplianceSummary -> ConformancePackComplianceType
conformancePackComplianceStatus} -> ConformancePackComplianceType
conformancePackComplianceStatus) (\s :: ConformancePackComplianceSummary
s@ConformancePackComplianceSummary' {} ConformancePackComplianceType
a -> ConformancePackComplianceSummary
s {$sel:conformancePackComplianceStatus:ConformancePackComplianceSummary' :: ConformancePackComplianceType
conformancePackComplianceStatus = ConformancePackComplianceType
a} :: ConformancePackComplianceSummary)

instance
  Core.FromJSON
    ConformancePackComplianceSummary
  where
  parseJSON :: Value -> Parser ConformancePackComplianceSummary
parseJSON =
    String
-> (Object -> Parser ConformancePackComplianceSummary)
-> Value
-> Parser ConformancePackComplianceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ConformancePackComplianceSummary"
      ( \Object
x ->
          Text
-> ConformancePackComplianceType
-> ConformancePackComplianceSummary
ConformancePackComplianceSummary'
            (Text
 -> ConformancePackComplianceType
 -> ConformancePackComplianceSummary)
-> Parser Text
-> Parser
     (ConformancePackComplianceType -> ConformancePackComplianceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConformancePackName")
            Parser
  (ConformancePackComplianceType -> ConformancePackComplianceSummary)
-> Parser ConformancePackComplianceType
-> Parser ConformancePackComplianceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ConformancePackComplianceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConformancePackComplianceStatus")
      )

instance
  Prelude.Hashable
    ConformancePackComplianceSummary

instance
  Prelude.NFData
    ConformancePackComplianceSummary