{-# 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.AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-- 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.AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails where

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

-- | The log configuration for the results of the run command actions.
--
-- /See:/ 'newAwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' smart constructor.
data AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails = AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails'
  { -- | The name of the CloudWatch log group to send the logs to.
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
cloudWatchLogGroupName :: Prelude.Maybe Prelude.Text,
    -- | Identifies the folder in the S3 bucket to send the logs to.
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | Whether to enable encryption on the CloudWatch logs.
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Bool
cloudWatchEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Whether to encrypt the logs that are sent to the S3 bucket.
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Bool
s3EncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The name of the S3 bucket to send logs to.
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text
  }
  deriving (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Bool
(AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Bool)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> Bool)
-> Eq
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Bool
$c/= :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Bool
== :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Bool
$c== :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Bool
Prelude.Eq, ReadPrec
  [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
ReadPrec
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
Int
-> ReadS
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
ReadS
  [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
(Int
 -> ReadS
      AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> ReadS
     [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
-> ReadPrec
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> ReadPrec
     [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
-> Read
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
  [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
$creadListPrec :: ReadPrec
  [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
readPrec :: ReadPrec
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
$creadPrec :: ReadPrec
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
readList :: ReadS
  [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
$creadList :: ReadS
  [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
readsPrec :: Int
-> ReadS
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
$creadsPrec :: Int
-> ReadS
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
Prelude.Read, Int
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> ShowS
[AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
-> ShowS
AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> String
(Int
 -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> ShowS)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> String)
-> ([AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
    -> ShowS)
-> Show
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
-> ShowS
$cshowList :: [AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails]
-> ShowS
show :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> String
$cshow :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> String
showsPrec :: Int
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> ShowS
$cshowsPrec :: Int
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> ShowS
Prelude.Show, (forall x.
 AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Rep
      AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
      x)
-> (forall x.
    Rep
      AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
      x
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Generic
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
forall x.
Rep
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
  x
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
forall x.
AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Rep
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
  x
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
$cfrom :: forall x.
AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Rep
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     x
Prelude.Generic)

-- |
-- Create a value of 'AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' 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:
--
-- 'cloudWatchLogGroupName', 'awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchLogGroupName' - The name of the CloudWatch log group to send the logs to.
--
-- 's3KeyPrefix', 'awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3KeyPrefix' - Identifies the folder in the S3 bucket to send the logs to.
--
-- 'cloudWatchEncryptionEnabled', 'awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchEncryptionEnabled' - Whether to enable encryption on the CloudWatch logs.
--
-- 's3EncryptionEnabled', 'awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3EncryptionEnabled' - Whether to encrypt the logs that are sent to the S3 bucket.
--
-- 's3BucketName', 'awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3BucketName' - The name of the S3 bucket to send logs to.
newAwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails ::
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
newAwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
newAwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails =
  AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails'
    { $sel:cloudWatchLogGroupName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
cloudWatchLogGroupName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3KeyPrefix:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
s3KeyPrefix =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchEncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Bool
cloudWatchEncryptionEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:s3EncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Bool
s3EncryptionEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
s3BucketName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the CloudWatch log group to send the logs to.
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchLogGroupName :: Lens.Lens' AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails (Prelude.Maybe Prelude.Text)
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchLogGroupName :: (Maybe Text -> f (Maybe Text))
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> f AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchLogGroupName = (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Maybe Text)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> Maybe Text
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Lens
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {Maybe Text
cloudWatchLogGroupName :: Maybe Text
$sel:cloudWatchLogGroupName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
cloudWatchLogGroupName} -> Maybe Text
cloudWatchLogGroupName) (\s :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s@AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {} Maybe Text
a -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s {$sel:cloudWatchLogGroupName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
cloudWatchLogGroupName = Maybe Text
a} :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)

-- | Identifies the folder in the S3 bucket to send the logs to.
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3KeyPrefix :: Lens.Lens' AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails (Prelude.Maybe Prelude.Text)
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> f AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3KeyPrefix = (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Maybe Text)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> Maybe Text
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Lens
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s@AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {} Maybe Text
a -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s {$sel:s3KeyPrefix:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)

-- | Whether to enable encryption on the CloudWatch logs.
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchEncryptionEnabled :: Lens.Lens' AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails (Prelude.Maybe Prelude.Bool)
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchEncryptionEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> f AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_cloudWatchEncryptionEnabled = (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Maybe Bool)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> Maybe Bool
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Lens
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {Maybe Bool
cloudWatchEncryptionEnabled :: Maybe Bool
$sel:cloudWatchEncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Bool
cloudWatchEncryptionEnabled} -> Maybe Bool
cloudWatchEncryptionEnabled) (\s :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s@AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {} Maybe Bool
a -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s {$sel:cloudWatchEncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Bool
cloudWatchEncryptionEnabled = Maybe Bool
a} :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)

-- | Whether to encrypt the logs that are sent to the S3 bucket.
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3EncryptionEnabled :: Lens.Lens' AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails (Prelude.Maybe Prelude.Bool)
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3EncryptionEnabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> f AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3EncryptionEnabled = (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Maybe Bool)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> Maybe Bool
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Lens
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {Maybe Bool
s3EncryptionEnabled :: Maybe Bool
$sel:s3EncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Bool
s3EncryptionEnabled} -> Maybe Bool
s3EncryptionEnabled) (\s :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s@AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {} Maybe Bool
a -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s {$sel:s3EncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Bool
s3EncryptionEnabled = Maybe Bool
a} :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)

-- | The name of the S3 bucket to send logs to.
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3BucketName :: Lens.Lens' AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails (Prelude.Maybe Prelude.Text)
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> f AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
awsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails_s3BucketName = (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
 -> Maybe Text)
-> (AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
    -> Maybe Text
    -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Lens
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s@AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {} Maybe Text
a -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
s {$sel:s3BucketName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: Maybe Text
s3BucketName = Maybe Text
a} :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)

instance
  Core.FromJSON
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
  where
  parseJSON :: Value
-> Parser
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
parseJSON =
    String
-> (Object
    -> Parser
         AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Value
-> Parser
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails'
            (Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
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
"CloudWatchLogGroupName")
              Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
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
"S3KeyPrefix")
              Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchEncryptionEnabled")
              Parser
  (Maybe Bool
   -> Maybe Text
   -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3EncryptionEnabled")
              Parser
  (Maybe Text
   -> AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails)
-> Parser (Maybe Text)
-> Parser
     AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
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
"S3BucketName")
      )

instance
  Prelude.Hashable
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails

instance
  Prelude.NFData
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails

instance
  Core.ToJSON
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
  where
  toJSON :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Value
toJSON
    AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' {Maybe Bool
Maybe Text
s3BucketName :: Maybe Text
s3EncryptionEnabled :: Maybe Bool
cloudWatchEncryptionEnabled :: Maybe Bool
s3KeyPrefix :: Maybe Text
cloudWatchLogGroupName :: Maybe Text
$sel:s3BucketName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
$sel:s3EncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Bool
$sel:cloudWatchEncryptionEnabled:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Bool
$sel:s3KeyPrefix:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
$sel:cloudWatchLogGroupName:AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails' :: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails
-> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"CloudWatchLogGroupName" 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
cloudWatchLogGroupName,
              (Text
"S3KeyPrefix" 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
s3KeyPrefix,
              (Text
"CloudWatchEncryptionEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
cloudWatchEncryptionEnabled,
              (Text
"S3EncryptionEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
                (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
s3EncryptionEnabled,
              (Text
"S3BucketName" 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
s3BucketName
            ]
        )