{-# 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.Batch.Types.LogConfiguration
-- 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.Batch.Types.LogConfiguration where

import Amazonka.Batch.Types.LogDriver
import Amazonka.Batch.Types.Secret
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Log configuration options to send to a custom log driver for the
-- container.
--
-- /See:/ 'newLogConfiguration' smart constructor.
data LogConfiguration = LogConfiguration'
  { -- | The configuration options to send to the log driver. This parameter
    -- requires version 1.19 of the Docker Remote API or greater on your
    -- container instance. To check the Docker Remote API version on your
    -- container instance, log into your container instance and run the
    -- following command: @sudo docker version | grep \"Server API version\"@
    LogConfiguration -> Maybe (HashMap Text Text)
options :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The secrets to pass to the log configuration. For more information, see
    -- <https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html Specifying Sensitive Data>
    -- in the /Batch User Guide/.
    LogConfiguration -> Maybe [Secret]
secretOptions :: Prelude.Maybe [Secret],
    -- | The log driver to use for the container. The valid values listed for
    -- this parameter are log drivers that the Amazon ECS container agent can
    -- communicate with by default.
    --
    -- The supported log drivers are @awslogs@, @fluentd@, @gelf@, @json-file@,
    -- @journald@, @logentries@, @syslog@, and @splunk@.
    --
    -- Jobs that are running on Fargate resources are restricted to the
    -- @awslogs@ and @splunk@ log drivers.
    --
    -- [awslogs]
    --     Specifies the Amazon CloudWatch Logs logging driver. For more
    --     information, see
    --     <https://docs.aws.amazon.com/batch/latest/userguide/using_awslogs.html Using the awslogs Log Driver>
    --     in the /Batch User Guide/ and
    --     <https://docs.docker.com/config/containers/logging/awslogs/ Amazon CloudWatch Logs logging driver>
    --     in the Docker documentation.
    --
    -- [fluentd]
    --     Specifies the Fluentd logging driver. For more information,
    --     including usage and options, see
    --     <https://docs.docker.com/config/containers/logging/fluentd/ Fluentd logging driver>
    --     in the Docker documentation.
    --
    -- [gelf]
    --     Specifies the Graylog Extended Format (GELF) logging driver. For
    --     more information, including usage and options, see
    --     <https://docs.docker.com/config/containers/logging/gelf/ Graylog Extended Format logging driver>
    --     in the Docker documentation.
    --
    -- [journald]
    --     Specifies the journald logging driver. For more information,
    --     including usage and options, see
    --     <https://docs.docker.com/config/containers/logging/journald/ Journald logging driver>
    --     in the Docker documentation.
    --
    -- [json-file]
    --     Specifies the JSON file logging driver. For more information,
    --     including usage and options, see
    --     <https://docs.docker.com/config/containers/logging/json-file/ JSON File logging driver>
    --     in the Docker documentation.
    --
    -- [splunk]
    --     Specifies the Splunk logging driver. For more information, including
    --     usage and options, see
    --     <https://docs.docker.com/config/containers/logging/splunk/ Splunk logging driver>
    --     in the Docker documentation.
    --
    -- [syslog]
    --     Specifies the syslog logging driver. For more information, including
    --     usage and options, see
    --     <https://docs.docker.com/config/containers/logging/syslog/ Syslog logging driver>
    --     in the Docker documentation.
    --
    -- If you have a custom driver that\'s not listed earlier that you want to
    -- work with the Amazon ECS container agent, you can fork the Amazon ECS
    -- container agent project that\'s
    -- <https://github.com/aws/amazon-ecs-agent available on GitHub> and
    -- customize it to work with that driver. We encourage you to submit pull
    -- requests for changes that you want to have included. However, Amazon Web
    -- Services doesn\'t currently support running modified copies of this
    -- software.
    --
    -- This parameter requires version 1.18 of the Docker Remote API or greater
    -- on your container instance. To check the Docker Remote API version on
    -- your container instance, log into your container instance and run the
    -- following command: @sudo docker version | grep \"Server API version\"@
    LogConfiguration -> LogDriver
logDriver :: LogDriver
  }
  deriving (LogConfiguration -> LogConfiguration -> Bool
(LogConfiguration -> LogConfiguration -> Bool)
-> (LogConfiguration -> LogConfiguration -> Bool)
-> Eq LogConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogConfiguration -> LogConfiguration -> Bool
$c/= :: LogConfiguration -> LogConfiguration -> Bool
== :: LogConfiguration -> LogConfiguration -> Bool
$c== :: LogConfiguration -> LogConfiguration -> Bool
Prelude.Eq, ReadPrec [LogConfiguration]
ReadPrec LogConfiguration
Int -> ReadS LogConfiguration
ReadS [LogConfiguration]
(Int -> ReadS LogConfiguration)
-> ReadS [LogConfiguration]
-> ReadPrec LogConfiguration
-> ReadPrec [LogConfiguration]
-> Read LogConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogConfiguration]
$creadListPrec :: ReadPrec [LogConfiguration]
readPrec :: ReadPrec LogConfiguration
$creadPrec :: ReadPrec LogConfiguration
readList :: ReadS [LogConfiguration]
$creadList :: ReadS [LogConfiguration]
readsPrec :: Int -> ReadS LogConfiguration
$creadsPrec :: Int -> ReadS LogConfiguration
Prelude.Read, Int -> LogConfiguration -> ShowS
[LogConfiguration] -> ShowS
LogConfiguration -> String
(Int -> LogConfiguration -> ShowS)
-> (LogConfiguration -> String)
-> ([LogConfiguration] -> ShowS)
-> Show LogConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogConfiguration] -> ShowS
$cshowList :: [LogConfiguration] -> ShowS
show :: LogConfiguration -> String
$cshow :: LogConfiguration -> String
showsPrec :: Int -> LogConfiguration -> ShowS
$cshowsPrec :: Int -> LogConfiguration -> ShowS
Prelude.Show, (forall x. LogConfiguration -> Rep LogConfiguration x)
-> (forall x. Rep LogConfiguration x -> LogConfiguration)
-> Generic LogConfiguration
forall x. Rep LogConfiguration x -> LogConfiguration
forall x. LogConfiguration -> Rep LogConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogConfiguration x -> LogConfiguration
$cfrom :: forall x. LogConfiguration -> Rep LogConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'LogConfiguration' 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:
--
-- 'options', 'logConfiguration_options' - The configuration options to send to the log driver. This parameter
-- requires version 1.19 of the Docker Remote API or greater on your
-- container instance. To check the Docker Remote API version on your
-- container instance, log into your container instance and run the
-- following command: @sudo docker version | grep \"Server API version\"@
--
-- 'secretOptions', 'logConfiguration_secretOptions' - The secrets to pass to the log configuration. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html Specifying Sensitive Data>
-- in the /Batch User Guide/.
--
-- 'logDriver', 'logConfiguration_logDriver' - The log driver to use for the container. The valid values listed for
-- this parameter are log drivers that the Amazon ECS container agent can
-- communicate with by default.
--
-- The supported log drivers are @awslogs@, @fluentd@, @gelf@, @json-file@,
-- @journald@, @logentries@, @syslog@, and @splunk@.
--
-- Jobs that are running on Fargate resources are restricted to the
-- @awslogs@ and @splunk@ log drivers.
--
-- [awslogs]
--     Specifies the Amazon CloudWatch Logs logging driver. For more
--     information, see
--     <https://docs.aws.amazon.com/batch/latest/userguide/using_awslogs.html Using the awslogs Log Driver>
--     in the /Batch User Guide/ and
--     <https://docs.docker.com/config/containers/logging/awslogs/ Amazon CloudWatch Logs logging driver>
--     in the Docker documentation.
--
-- [fluentd]
--     Specifies the Fluentd logging driver. For more information,
--     including usage and options, see
--     <https://docs.docker.com/config/containers/logging/fluentd/ Fluentd logging driver>
--     in the Docker documentation.
--
-- [gelf]
--     Specifies the Graylog Extended Format (GELF) logging driver. For
--     more information, including usage and options, see
--     <https://docs.docker.com/config/containers/logging/gelf/ Graylog Extended Format logging driver>
--     in the Docker documentation.
--
-- [journald]
--     Specifies the journald logging driver. For more information,
--     including usage and options, see
--     <https://docs.docker.com/config/containers/logging/journald/ Journald logging driver>
--     in the Docker documentation.
--
-- [json-file]
--     Specifies the JSON file logging driver. For more information,
--     including usage and options, see
--     <https://docs.docker.com/config/containers/logging/json-file/ JSON File logging driver>
--     in the Docker documentation.
--
-- [splunk]
--     Specifies the Splunk logging driver. For more information, including
--     usage and options, see
--     <https://docs.docker.com/config/containers/logging/splunk/ Splunk logging driver>
--     in the Docker documentation.
--
-- [syslog]
--     Specifies the syslog logging driver. For more information, including
--     usage and options, see
--     <https://docs.docker.com/config/containers/logging/syslog/ Syslog logging driver>
--     in the Docker documentation.
--
-- If you have a custom driver that\'s not listed earlier that you want to
-- work with the Amazon ECS container agent, you can fork the Amazon ECS
-- container agent project that\'s
-- <https://github.com/aws/amazon-ecs-agent available on GitHub> and
-- customize it to work with that driver. We encourage you to submit pull
-- requests for changes that you want to have included. However, Amazon Web
-- Services doesn\'t currently support running modified copies of this
-- software.
--
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log into your container instance and run the
-- following command: @sudo docker version | grep \"Server API version\"@
newLogConfiguration ::
  -- | 'logDriver'
  LogDriver ->
  LogConfiguration
newLogConfiguration :: LogDriver -> LogConfiguration
newLogConfiguration LogDriver
pLogDriver_ =
  LogConfiguration' :: Maybe (HashMap Text Text)
-> Maybe [Secret] -> LogDriver -> LogConfiguration
LogConfiguration'
    { $sel:options:LogConfiguration' :: Maybe (HashMap Text Text)
options = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:secretOptions:LogConfiguration' :: Maybe [Secret]
secretOptions = Maybe [Secret]
forall a. Maybe a
Prelude.Nothing,
      $sel:logDriver:LogConfiguration' :: LogDriver
logDriver = LogDriver
pLogDriver_
    }

-- | The configuration options to send to the log driver. This parameter
-- requires version 1.19 of the Docker Remote API or greater on your
-- container instance. To check the Docker Remote API version on your
-- container instance, log into your container instance and run the
-- following command: @sudo docker version | grep \"Server API version\"@
logConfiguration_options :: Lens.Lens' LogConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
logConfiguration_options :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> LogConfiguration -> f LogConfiguration
logConfiguration_options = (LogConfiguration -> Maybe (HashMap Text Text))
-> (LogConfiguration
    -> Maybe (HashMap Text Text) -> LogConfiguration)
-> Lens
     LogConfiguration
     LogConfiguration
     (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 (\LogConfiguration' {Maybe (HashMap Text Text)
options :: Maybe (HashMap Text Text)
$sel:options:LogConfiguration' :: LogConfiguration -> Maybe (HashMap Text Text)
options} -> Maybe (HashMap Text Text)
options) (\s :: LogConfiguration
s@LogConfiguration' {} Maybe (HashMap Text Text)
a -> LogConfiguration
s {$sel:options:LogConfiguration' :: Maybe (HashMap Text Text)
options = Maybe (HashMap Text Text)
a} :: LogConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> LogConfiguration -> f LogConfiguration)
-> ((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)))
-> LogConfiguration
-> f LogConfiguration
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. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html Specifying Sensitive Data>
-- in the /Batch User Guide/.
logConfiguration_secretOptions :: Lens.Lens' LogConfiguration (Prelude.Maybe [Secret])
logConfiguration_secretOptions :: (Maybe [Secret] -> f (Maybe [Secret]))
-> LogConfiguration -> f LogConfiguration
logConfiguration_secretOptions = (LogConfiguration -> Maybe [Secret])
-> (LogConfiguration -> Maybe [Secret] -> LogConfiguration)
-> Lens
     LogConfiguration LogConfiguration (Maybe [Secret]) (Maybe [Secret])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogConfiguration' {Maybe [Secret]
secretOptions :: Maybe [Secret]
$sel:secretOptions:LogConfiguration' :: LogConfiguration -> Maybe [Secret]
secretOptions} -> Maybe [Secret]
secretOptions) (\s :: LogConfiguration
s@LogConfiguration' {} Maybe [Secret]
a -> LogConfiguration
s {$sel:secretOptions:LogConfiguration' :: Maybe [Secret]
secretOptions = Maybe [Secret]
a} :: LogConfiguration) ((Maybe [Secret] -> f (Maybe [Secret]))
 -> LogConfiguration -> f LogConfiguration)
-> ((Maybe [Secret] -> f (Maybe [Secret]))
    -> Maybe [Secret] -> f (Maybe [Secret]))
-> (Maybe [Secret] -> f (Maybe [Secret]))
-> LogConfiguration
-> f LogConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Secret] [Secret] [Secret] [Secret]
-> Iso
     (Maybe [Secret]) (Maybe [Secret]) (Maybe [Secret]) (Maybe [Secret])
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 [Secret] [Secret] [Secret] [Secret]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The log driver to use for the container. The valid values listed for
-- this parameter are log drivers that the Amazon ECS container agent can
-- communicate with by default.
--
-- The supported log drivers are @awslogs@, @fluentd@, @gelf@, @json-file@,
-- @journald@, @logentries@, @syslog@, and @splunk@.
--
-- Jobs that are running on Fargate resources are restricted to the
-- @awslogs@ and @splunk@ log drivers.
--
-- [awslogs]
--     Specifies the Amazon CloudWatch Logs logging driver. For more
--     information, see
--     <https://docs.aws.amazon.com/batch/latest/userguide/using_awslogs.html Using the awslogs Log Driver>
--     in the /Batch User Guide/ and
--     <https://docs.docker.com/config/containers/logging/awslogs/ Amazon CloudWatch Logs logging driver>
--     in the Docker documentation.
--
-- [fluentd]
--     Specifies the Fluentd logging driver. For more information,
--     including usage and options, see
--     <https://docs.docker.com/config/containers/logging/fluentd/ Fluentd logging driver>
--     in the Docker documentation.
--
-- [gelf]
--     Specifies the Graylog Extended Format (GELF) logging driver. For
--     more information, including usage and options, see
--     <https://docs.docker.com/config/containers/logging/gelf/ Graylog Extended Format logging driver>
--     in the Docker documentation.
--
-- [journald]
--     Specifies the journald logging driver. For more information,
--     including usage and options, see
--     <https://docs.docker.com/config/containers/logging/journald/ Journald logging driver>
--     in the Docker documentation.
--
-- [json-file]
--     Specifies the JSON file logging driver. For more information,
--     including usage and options, see
--     <https://docs.docker.com/config/containers/logging/json-file/ JSON File logging driver>
--     in the Docker documentation.
--
-- [splunk]
--     Specifies the Splunk logging driver. For more information, including
--     usage and options, see
--     <https://docs.docker.com/config/containers/logging/splunk/ Splunk logging driver>
--     in the Docker documentation.
--
-- [syslog]
--     Specifies the syslog logging driver. For more information, including
--     usage and options, see
--     <https://docs.docker.com/config/containers/logging/syslog/ Syslog logging driver>
--     in the Docker documentation.
--
-- If you have a custom driver that\'s not listed earlier that you want to
-- work with the Amazon ECS container agent, you can fork the Amazon ECS
-- container agent project that\'s
-- <https://github.com/aws/amazon-ecs-agent available on GitHub> and
-- customize it to work with that driver. We encourage you to submit pull
-- requests for changes that you want to have included. However, Amazon Web
-- Services doesn\'t currently support running modified copies of this
-- software.
--
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log into your container instance and run the
-- following command: @sudo docker version | grep \"Server API version\"@
logConfiguration_logDriver :: Lens.Lens' LogConfiguration LogDriver
logConfiguration_logDriver :: (LogDriver -> f LogDriver)
-> LogConfiguration -> f LogConfiguration
logConfiguration_logDriver = (LogConfiguration -> LogDriver)
-> (LogConfiguration -> LogDriver -> LogConfiguration)
-> Lens LogConfiguration LogConfiguration LogDriver LogDriver
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogConfiguration' {LogDriver
logDriver :: LogDriver
$sel:logDriver:LogConfiguration' :: LogConfiguration -> LogDriver
logDriver} -> LogDriver
logDriver) (\s :: LogConfiguration
s@LogConfiguration' {} LogDriver
a -> LogConfiguration
s {$sel:logDriver:LogConfiguration' :: LogDriver
logDriver = LogDriver
a} :: LogConfiguration)

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

instance Prelude.Hashable LogConfiguration

instance Prelude.NFData LogConfiguration

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