{-# 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.ConformancePackComplianceScoresFilters
-- 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.ConformancePackComplianceScoresFilters 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

-- | A list of filters to apply to the conformance pack compliance score
-- result set.
--
-- /See:/ 'newConformancePackComplianceScoresFilters' smart constructor.
data ConformancePackComplianceScoresFilters = ConformancePackComplianceScoresFilters'
  { -- | The names of the conformance packs whose compliance scores you want to
    -- include in the conformance pack compliance score result set. You can
    -- include up to 25 conformance packs in the @ConformancePackNames@ array
    -- of strings, each with a character limit of 256 characters for the
    -- conformance pack name.
    ConformancePackComplianceScoresFilters -> NonEmpty Text
conformancePackNames :: Prelude.NonEmpty Prelude.Text
  }
  deriving (ConformancePackComplianceScoresFilters
-> ConformancePackComplianceScoresFilters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConformancePackComplianceScoresFilters
-> ConformancePackComplianceScoresFilters -> Bool
$c/= :: ConformancePackComplianceScoresFilters
-> ConformancePackComplianceScoresFilters -> Bool
== :: ConformancePackComplianceScoresFilters
-> ConformancePackComplianceScoresFilters -> Bool
$c== :: ConformancePackComplianceScoresFilters
-> ConformancePackComplianceScoresFilters -> Bool
Prelude.Eq, ReadPrec [ConformancePackComplianceScoresFilters]
ReadPrec ConformancePackComplianceScoresFilters
Int -> ReadS ConformancePackComplianceScoresFilters
ReadS [ConformancePackComplianceScoresFilters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConformancePackComplianceScoresFilters]
$creadListPrec :: ReadPrec [ConformancePackComplianceScoresFilters]
readPrec :: ReadPrec ConformancePackComplianceScoresFilters
$creadPrec :: ReadPrec ConformancePackComplianceScoresFilters
readList :: ReadS [ConformancePackComplianceScoresFilters]
$creadList :: ReadS [ConformancePackComplianceScoresFilters]
readsPrec :: Int -> ReadS ConformancePackComplianceScoresFilters
$creadsPrec :: Int -> ReadS ConformancePackComplianceScoresFilters
Prelude.Read, Int -> ConformancePackComplianceScoresFilters -> ShowS
[ConformancePackComplianceScoresFilters] -> ShowS
ConformancePackComplianceScoresFilters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConformancePackComplianceScoresFilters] -> ShowS
$cshowList :: [ConformancePackComplianceScoresFilters] -> ShowS
show :: ConformancePackComplianceScoresFilters -> String
$cshow :: ConformancePackComplianceScoresFilters -> String
showsPrec :: Int -> ConformancePackComplianceScoresFilters -> ShowS
$cshowsPrec :: Int -> ConformancePackComplianceScoresFilters -> ShowS
Prelude.Show, forall x.
Rep ConformancePackComplianceScoresFilters x
-> ConformancePackComplianceScoresFilters
forall x.
ConformancePackComplianceScoresFilters
-> Rep ConformancePackComplianceScoresFilters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConformancePackComplianceScoresFilters x
-> ConformancePackComplianceScoresFilters
$cfrom :: forall x.
ConformancePackComplianceScoresFilters
-> Rep ConformancePackComplianceScoresFilters x
Prelude.Generic)

-- |
-- Create a value of 'ConformancePackComplianceScoresFilters' 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:
--
-- 'conformancePackNames', 'conformancePackComplianceScoresFilters_conformancePackNames' - The names of the conformance packs whose compliance scores you want to
-- include in the conformance pack compliance score result set. You can
-- include up to 25 conformance packs in the @ConformancePackNames@ array
-- of strings, each with a character limit of 256 characters for the
-- conformance pack name.
newConformancePackComplianceScoresFilters ::
  -- | 'conformancePackNames'
  Prelude.NonEmpty Prelude.Text ->
  ConformancePackComplianceScoresFilters
newConformancePackComplianceScoresFilters :: NonEmpty Text -> ConformancePackComplianceScoresFilters
newConformancePackComplianceScoresFilters
  NonEmpty Text
pConformancePackNames_ =
    ConformancePackComplianceScoresFilters'
      { $sel:conformancePackNames:ConformancePackComplianceScoresFilters' :: NonEmpty Text
conformancePackNames =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
            forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pConformancePackNames_
      }

-- | The names of the conformance packs whose compliance scores you want to
-- include in the conformance pack compliance score result set. You can
-- include up to 25 conformance packs in the @ConformancePackNames@ array
-- of strings, each with a character limit of 256 characters for the
-- conformance pack name.
conformancePackComplianceScoresFilters_conformancePackNames :: Lens.Lens' ConformancePackComplianceScoresFilters (Prelude.NonEmpty Prelude.Text)
conformancePackComplianceScoresFilters_conformancePackNames :: Lens' ConformancePackComplianceScoresFilters (NonEmpty Text)
conformancePackComplianceScoresFilters_conformancePackNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackComplianceScoresFilters' {NonEmpty Text
conformancePackNames :: NonEmpty Text
$sel:conformancePackNames:ConformancePackComplianceScoresFilters' :: ConformancePackComplianceScoresFilters -> NonEmpty Text
conformancePackNames} -> NonEmpty Text
conformancePackNames) (\s :: ConformancePackComplianceScoresFilters
s@ConformancePackComplianceScoresFilters' {} NonEmpty Text
a -> ConformancePackComplianceScoresFilters
s {$sel:conformancePackNames:ConformancePackComplianceScoresFilters' :: NonEmpty Text
conformancePackNames = NonEmpty Text
a} :: ConformancePackComplianceScoresFilters) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.Hashable
    ConformancePackComplianceScoresFilters
  where
  hashWithSalt :: Int -> ConformancePackComplianceScoresFilters -> Int
hashWithSalt
    Int
_salt
    ConformancePackComplianceScoresFilters' {NonEmpty Text
conformancePackNames :: NonEmpty Text
$sel:conformancePackNames:ConformancePackComplianceScoresFilters' :: ConformancePackComplianceScoresFilters -> NonEmpty Text
..} =
      Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
conformancePackNames

instance
  Prelude.NFData
    ConformancePackComplianceScoresFilters
  where
  rnf :: ConformancePackComplianceScoresFilters -> ()
rnf ConformancePackComplianceScoresFilters' {NonEmpty Text
conformancePackNames :: NonEmpty Text
$sel:conformancePackNames:ConformancePackComplianceScoresFilters' :: ConformancePackComplianceScoresFilters -> NonEmpty Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
conformancePackNames

instance
  Data.ToJSON
    ConformancePackComplianceScoresFilters
  where
  toJSON :: ConformancePackComplianceScoresFilters -> Value
toJSON ConformancePackComplianceScoresFilters' {NonEmpty Text
conformancePackNames :: NonEmpty Text
$sel:conformancePackNames:ConformancePackComplianceScoresFilters' :: ConformancePackComplianceScoresFilters -> NonEmpty Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              ( Key
"ConformancePackNames"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
conformancePackNames
              )
          ]
      )