{-# 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.Shield.Types.ProtectionGroupPatternTypeLimits
-- 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.Shield.Types.ProtectionGroupPatternTypeLimits where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Shield.Types.ProtectionGroupArbitraryPatternLimits

-- | Limits settings by pattern type in the protection groups for your
-- subscription.
--
-- /See:/ 'newProtectionGroupPatternTypeLimits' smart constructor.
data ProtectionGroupPatternTypeLimits = ProtectionGroupPatternTypeLimits'
  { -- | Limits settings on protection groups with arbitrary pattern type.
    ProtectionGroupPatternTypeLimits
-> ProtectionGroupArbitraryPatternLimits
arbitraryPatternLimits :: ProtectionGroupArbitraryPatternLimits
  }
  deriving (ProtectionGroupPatternTypeLimits
-> ProtectionGroupPatternTypeLimits -> Bool
(ProtectionGroupPatternTypeLimits
 -> ProtectionGroupPatternTypeLimits -> Bool)
-> (ProtectionGroupPatternTypeLimits
    -> ProtectionGroupPatternTypeLimits -> Bool)
-> Eq ProtectionGroupPatternTypeLimits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProtectionGroupPatternTypeLimits
-> ProtectionGroupPatternTypeLimits -> Bool
$c/= :: ProtectionGroupPatternTypeLimits
-> ProtectionGroupPatternTypeLimits -> Bool
== :: ProtectionGroupPatternTypeLimits
-> ProtectionGroupPatternTypeLimits -> Bool
$c== :: ProtectionGroupPatternTypeLimits
-> ProtectionGroupPatternTypeLimits -> Bool
Prelude.Eq, ReadPrec [ProtectionGroupPatternTypeLimits]
ReadPrec ProtectionGroupPatternTypeLimits
Int -> ReadS ProtectionGroupPatternTypeLimits
ReadS [ProtectionGroupPatternTypeLimits]
(Int -> ReadS ProtectionGroupPatternTypeLimits)
-> ReadS [ProtectionGroupPatternTypeLimits]
-> ReadPrec ProtectionGroupPatternTypeLimits
-> ReadPrec [ProtectionGroupPatternTypeLimits]
-> Read ProtectionGroupPatternTypeLimits
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProtectionGroupPatternTypeLimits]
$creadListPrec :: ReadPrec [ProtectionGroupPatternTypeLimits]
readPrec :: ReadPrec ProtectionGroupPatternTypeLimits
$creadPrec :: ReadPrec ProtectionGroupPatternTypeLimits
readList :: ReadS [ProtectionGroupPatternTypeLimits]
$creadList :: ReadS [ProtectionGroupPatternTypeLimits]
readsPrec :: Int -> ReadS ProtectionGroupPatternTypeLimits
$creadsPrec :: Int -> ReadS ProtectionGroupPatternTypeLimits
Prelude.Read, Int -> ProtectionGroupPatternTypeLimits -> ShowS
[ProtectionGroupPatternTypeLimits] -> ShowS
ProtectionGroupPatternTypeLimits -> String
(Int -> ProtectionGroupPatternTypeLimits -> ShowS)
-> (ProtectionGroupPatternTypeLimits -> String)
-> ([ProtectionGroupPatternTypeLimits] -> ShowS)
-> Show ProtectionGroupPatternTypeLimits
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProtectionGroupPatternTypeLimits] -> ShowS
$cshowList :: [ProtectionGroupPatternTypeLimits] -> ShowS
show :: ProtectionGroupPatternTypeLimits -> String
$cshow :: ProtectionGroupPatternTypeLimits -> String
showsPrec :: Int -> ProtectionGroupPatternTypeLimits -> ShowS
$cshowsPrec :: Int -> ProtectionGroupPatternTypeLimits -> ShowS
Prelude.Show, (forall x.
 ProtectionGroupPatternTypeLimits
 -> Rep ProtectionGroupPatternTypeLimits x)
-> (forall x.
    Rep ProtectionGroupPatternTypeLimits x
    -> ProtectionGroupPatternTypeLimits)
-> Generic ProtectionGroupPatternTypeLimits
forall x.
Rep ProtectionGroupPatternTypeLimits x
-> ProtectionGroupPatternTypeLimits
forall x.
ProtectionGroupPatternTypeLimits
-> Rep ProtectionGroupPatternTypeLimits x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProtectionGroupPatternTypeLimits x
-> ProtectionGroupPatternTypeLimits
$cfrom :: forall x.
ProtectionGroupPatternTypeLimits
-> Rep ProtectionGroupPatternTypeLimits x
Prelude.Generic)

-- |
-- Create a value of 'ProtectionGroupPatternTypeLimits' 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:
--
-- 'arbitraryPatternLimits', 'protectionGroupPatternTypeLimits_arbitraryPatternLimits' - Limits settings on protection groups with arbitrary pattern type.
newProtectionGroupPatternTypeLimits ::
  -- | 'arbitraryPatternLimits'
  ProtectionGroupArbitraryPatternLimits ->
  ProtectionGroupPatternTypeLimits
newProtectionGroupPatternTypeLimits :: ProtectionGroupArbitraryPatternLimits
-> ProtectionGroupPatternTypeLimits
newProtectionGroupPatternTypeLimits
  ProtectionGroupArbitraryPatternLimits
pArbitraryPatternLimits_ =
    ProtectionGroupPatternTypeLimits' :: ProtectionGroupArbitraryPatternLimits
-> ProtectionGroupPatternTypeLimits
ProtectionGroupPatternTypeLimits'
      { $sel:arbitraryPatternLimits:ProtectionGroupPatternTypeLimits' :: ProtectionGroupArbitraryPatternLimits
arbitraryPatternLimits =
          ProtectionGroupArbitraryPatternLimits
pArbitraryPatternLimits_
      }

-- | Limits settings on protection groups with arbitrary pattern type.
protectionGroupPatternTypeLimits_arbitraryPatternLimits :: Lens.Lens' ProtectionGroupPatternTypeLimits ProtectionGroupArbitraryPatternLimits
protectionGroupPatternTypeLimits_arbitraryPatternLimits :: (ProtectionGroupArbitraryPatternLimits
 -> f ProtectionGroupArbitraryPatternLimits)
-> ProtectionGroupPatternTypeLimits
-> f ProtectionGroupPatternTypeLimits
protectionGroupPatternTypeLimits_arbitraryPatternLimits = (ProtectionGroupPatternTypeLimits
 -> ProtectionGroupArbitraryPatternLimits)
-> (ProtectionGroupPatternTypeLimits
    -> ProtectionGroupArbitraryPatternLimits
    -> ProtectionGroupPatternTypeLimits)
-> Lens
     ProtectionGroupPatternTypeLimits
     ProtectionGroupPatternTypeLimits
     ProtectionGroupArbitraryPatternLimits
     ProtectionGroupArbitraryPatternLimits
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProtectionGroupPatternTypeLimits' {ProtectionGroupArbitraryPatternLimits
arbitraryPatternLimits :: ProtectionGroupArbitraryPatternLimits
$sel:arbitraryPatternLimits:ProtectionGroupPatternTypeLimits' :: ProtectionGroupPatternTypeLimits
-> ProtectionGroupArbitraryPatternLimits
arbitraryPatternLimits} -> ProtectionGroupArbitraryPatternLimits
arbitraryPatternLimits) (\s :: ProtectionGroupPatternTypeLimits
s@ProtectionGroupPatternTypeLimits' {} ProtectionGroupArbitraryPatternLimits
a -> ProtectionGroupPatternTypeLimits
s {$sel:arbitraryPatternLimits:ProtectionGroupPatternTypeLimits' :: ProtectionGroupArbitraryPatternLimits
arbitraryPatternLimits = ProtectionGroupArbitraryPatternLimits
a} :: ProtectionGroupPatternTypeLimits)

instance
  Core.FromJSON
    ProtectionGroupPatternTypeLimits
  where
  parseJSON :: Value -> Parser ProtectionGroupPatternTypeLimits
parseJSON =
    String
-> (Object -> Parser ProtectionGroupPatternTypeLimits)
-> Value
-> Parser ProtectionGroupPatternTypeLimits
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProtectionGroupPatternTypeLimits"
      ( \Object
x ->
          ProtectionGroupArbitraryPatternLimits
-> ProtectionGroupPatternTypeLimits
ProtectionGroupPatternTypeLimits'
            (ProtectionGroupArbitraryPatternLimits
 -> ProtectionGroupPatternTypeLimits)
-> Parser ProtectionGroupArbitraryPatternLimits
-> Parser ProtectionGroupPatternTypeLimits
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser ProtectionGroupArbitraryPatternLimits
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ArbitraryPatternLimits")
      )

instance
  Prelude.Hashable
    ProtectionGroupPatternTypeLimits

instance
  Prelude.NFData
    ProtectionGroupPatternTypeLimits