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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails

-- | The log configuration specification for the container.
--
-- /See:/ 'newAwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' smart constructor.
data AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails = AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails'
  { -- | The log driver to use for the container.
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe Text
logDriver :: Prelude.Maybe Prelude.Text,
    -- | The configuration options to send to the log driver. Requires version
    -- 1.19 of the Docker Remote API or greater on your container instance.
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe (HashMap Text Text)
options :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The secrets to pass to the log configuration.
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions :: Prelude.Maybe [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  }
  deriving (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Bool
(AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> Bool)
-> (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
    -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
    -> Bool)
-> Eq
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Bool
$c/= :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Bool
== :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Bool
$c== :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Bool
Prelude.Eq, ReadPrec
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
ReadPrec
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
Int
-> ReadS
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
ReadS
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
(Int
 -> ReadS
      AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> ReadS
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
-> ReadPrec
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> ReadPrec
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
-> Read
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
$creadListPrec :: ReadPrec
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
readPrec :: ReadPrec
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
$creadPrec :: ReadPrec
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
readList :: ReadS
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
$creadList :: ReadS
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
readsPrec :: Int
-> ReadS
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
$creadsPrec :: Int
-> ReadS
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
Prelude.Read, Int
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> ShowS
[AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
-> ShowS
AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> String
(Int
 -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> ShowS)
-> (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
    -> String)
-> ([AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
    -> ShowS)
-> Show
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
-> ShowS
$cshowList :: [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails]
-> ShowS
show :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> String
$cshow :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> String
showsPrec :: Int
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> ShowS
$cshowsPrec :: Int
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> ShowS
Prelude.Show, (forall x.
 AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> Rep
      AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails x)
-> (forall x.
    Rep
      AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails x
    -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Generic
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall x.
Rep
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall x.
AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Rep
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
$cfrom :: forall x.
AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Rep
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' 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:
--
-- 'logDriver', 'awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_logDriver' - The log driver to use for the container.
--
-- 'options', 'awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_options' - The configuration options to send to the log driver. Requires version
-- 1.19 of the Docker Remote API or greater on your container instance.
--
-- 'secretOptions', 'awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_secretOptions' - The secrets to pass to the log configuration.
newAwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails ::
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
newAwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
newAwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails =
  AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails'
    { $sel:logDriver:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe Text
logDriver =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:options:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe (HashMap Text Text)
options =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:secretOptions:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions =
        Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
forall a. Maybe a
Prelude.Nothing
    }

-- | The log driver to use for the container.
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_logDriver :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_logDriver :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_logDriver = (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> Maybe Text)
-> (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
    -> Maybe Text
    -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {Maybe Text
logDriver :: Maybe Text
$sel:logDriver:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe Text
logDriver} -> Maybe Text
logDriver) (\s :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
s@AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
s {$sel:logDriver:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe Text
logDriver = Maybe Text
a} :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)

-- | The configuration options to send to the log driver. Requires version
-- 1.19 of the Docker Remote API or greater on your container instance.
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_options :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_options :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_options = (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> Maybe (HashMap Text Text))
-> (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
    -> Maybe (HashMap Text Text)
    -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {Maybe (HashMap Text Text)
options :: Maybe (HashMap Text Text)
$sel:options:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe (HashMap Text Text)
options} -> Maybe (HashMap Text Text)
options) (\s :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
s@AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {} Maybe (HashMap Text Text)
a -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
s {$sel:options:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe (HashMap Text Text)
options = Maybe (HashMap Text Text)
a} :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The secrets to pass to the log configuration.
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_secretOptions :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails (Prelude.Maybe [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_secretOptions :: (Maybe
   [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
 -> f (Maybe
         [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
awsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails_secretOptions = (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> Maybe
      [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
-> (AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
    -> Maybe
         [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
    -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions :: Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
$sel:secretOptions:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions} -> Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions) (\s :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
s@AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {} Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
a -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
s {$sel:secretOptions:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions = Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
a} :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails) ((Maybe
    [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  -> f (Maybe
          [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
 -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
 -> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> ((Maybe
       [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
     -> f (Maybe
             [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
    -> Maybe
         [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
    -> f (Maybe
            [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
-> (Maybe
      [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
    -> f (Maybe
            [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> f AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
-> Iso
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.FromJSON
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
  where
  parseJSON :: Value
-> Parser
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
parseJSON =
    String
-> (Object
    -> Parser
         AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Value
-> Parser
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
-> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails'
            (Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe
      [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
 -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe
           [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
      -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
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
"LogDriver")
              Parser
  (Maybe (HashMap Text Text)
   -> Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
   -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
      -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Options" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
              Parser
  (Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
   -> AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails)
-> Parser
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
-> Parser
     AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe
        (Maybe
           [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecretOptions" Parser
  (Maybe
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]))
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
-> Parser
     (Maybe
        [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
forall a. Monoid a => a
Prelude.mempty)
      )

instance
  Prelude.Hashable
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails

instance
  Prelude.NFData
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails

instance
  Core.ToJSON
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
  where
  toJSON :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Value
toJSON
    AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' {Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
Maybe Text
Maybe (HashMap Text Text)
secretOptions :: Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
options :: Maybe (HashMap Text Text)
logDriver :: Maybe Text
$sel:secretOptions:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
$sel:options:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe (HashMap Text Text)
$sel:logDriver:AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails' :: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails
-> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"LogDriver" 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
logDriver,
              (Text
"Options" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
options,
              (Text
"SecretOptions" Text
-> [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
 -> Pair)
-> Maybe
     [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe
  [AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails]
secretOptions
            ]
        )