{-# 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.SecurityHub.Types.AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-- 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.SecurityHub.Types.AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A namespaced kernel parameter to set in the container.
--
-- /See:/ 'newAwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' smart constructor.
data AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails = AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails'
  { -- | The namespaced kernel parameter for which to set a value.
    AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | The value of the parameter.
    AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Maybe Text
value :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Bool
(AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
 -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
 -> Bool)
-> (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
    -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
    -> Bool)
-> Eq AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Bool
$c/= :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Bool
== :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Bool
$c== :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Bool
Prelude.Eq, ReadPrec
  [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
ReadPrec
  AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
Int
-> ReadS
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
ReadS
  [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
(Int
 -> ReadS
      AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails)
-> ReadS
     [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
-> ReadPrec
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> ReadPrec
     [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
-> Read
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
  [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
$creadListPrec :: ReadPrec
  [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
readPrec :: ReadPrec
  AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
$creadPrec :: ReadPrec
  AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
readList :: ReadS
  [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
$creadList :: ReadS
  [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
readsPrec :: Int
-> ReadS
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
$creadsPrec :: Int
-> ReadS
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
Prelude.Read, Int
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> ShowS
[AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
-> ShowS
AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> String
(Int
 -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
 -> ShowS)
-> (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
    -> String)
-> ([AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
    -> ShowS)
-> Show
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
-> ShowS
$cshowList :: [AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails]
-> ShowS
show :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> String
$cshow :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> String
showsPrec :: Int
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> ShowS
$cshowsPrec :: Int
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> ShowS
Prelude.Show, (forall x.
 AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
 -> Rep
      AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails x)
-> (forall x.
    Rep AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails x
    -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails)
-> Generic
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
forall x.
Rep AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
forall x.
AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Rep
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
$cfrom :: forall x.
AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Rep
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' 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:
--
-- 'namespace', 'awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_namespace' - The namespaced kernel parameter for which to set a value.
--
-- 'value', 'awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_value' - The value of the parameter.
newAwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails ::
  AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
newAwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
newAwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails =
  AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: Maybe Text
-> Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails'
    { $sel:namespace:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: Maybe Text
namespace =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:value:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: Maybe Text
value =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The namespaced kernel parameter for which to set a value.
awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_namespace :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_namespace :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_namespace = (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
 -> Maybe Text)
-> (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
    -> Maybe Text
    -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails)
-> Lens
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' {Maybe Text
namespace :: Maybe Text
$sel:namespace:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
s@AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
s {$sel:namespace:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: Maybe Text
namespace = Maybe Text
a} :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails)

-- | The value of the parameter.
awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_value :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_value :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
awsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails_value = (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
 -> Maybe Text)
-> (AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
    -> Maybe Text
    -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails)
-> Lens
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
     AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' {Maybe Text
value :: Maybe Text
$sel:value:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Maybe Text
value} -> Maybe Text
value) (\s :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
s@AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
s {$sel:value:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: Maybe Text
value = Maybe Text
a} :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails)

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

instance
  Prelude.Hashable
    AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails

instance
  Prelude.NFData
    AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails

instance
  Core.ToJSON
    AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
  where
  toJSON :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Value
toJSON
    AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' {Maybe Text
value :: Maybe Text
namespace :: Maybe Text
$sel:value:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Maybe Text
$sel:namespace:AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails
-> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"Namespace" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
namespace,
              (Text
"Value" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
value
            ]
        )