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

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

-- | Information about a Docker volume.
--
-- /See:/ 'newAwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' smart constructor.
data AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails = AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails'
  { -- | The Docker volume driver to use.
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
driver :: Prelude.Maybe Prelude.Text,
    -- | A map of Docker driver-specific options that are passed through.
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe (HashMap Text Text)
driverOpts :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The scope for the Docker volume that determines its lifecycle. Docker
    -- volumes that are scoped to a task are provisioned automatically when the
    -- task starts and destroyed when the task stops. Docker volumes that are
    -- shared persist after the task stops.
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
scope :: Prelude.Maybe Prelude.Text,
    -- | Custom metadata to add to the Docker volume.
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe (HashMap Text Text)
labels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Whether to create the Docker volume automatically if it does not already
    -- exist.
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Bool
autoprovision :: Prelude.Maybe Prelude.Bool
  }
  deriving (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Bool
(AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Bool)
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> Bool)
-> Eq AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Bool
$c/= :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Bool
== :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Bool
$c== :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Bool
Prelude.Eq, ReadPrec
  [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
ReadPrec
  AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
Int
-> ReadS
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
ReadS [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
(Int
 -> ReadS
      AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> ReadS
     [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
-> ReadPrec
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> ReadPrec
     [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
-> Read AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
  [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
$creadListPrec :: ReadPrec
  [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
readPrec :: ReadPrec
  AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
$creadPrec :: ReadPrec
  AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
readList :: ReadS [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
$creadList :: ReadS [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
readsPrec :: Int
-> ReadS
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
$creadsPrec :: Int
-> ReadS
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
Prelude.Read, Int
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> ShowS
[AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
-> ShowS
AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> String
(Int
 -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> ShowS)
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> String)
-> ([AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
    -> ShowS)
-> Show AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
-> ShowS
$cshowList :: [AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails]
-> ShowS
show :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> String
$cshow :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> String
showsPrec :: Int
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> ShowS
$cshowsPrec :: Int
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> ShowS
Prelude.Show, (forall x.
 AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Rep
      AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails x)
-> (forall x.
    Rep AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails x
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Generic
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall x.
Rep AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails x
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall x.
AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Rep
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails x
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
$cfrom :: forall x.
AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Rep
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' 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:
--
-- 'driver', 'awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driver' - The Docker volume driver to use.
--
-- 'driverOpts', 'awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driverOpts' - A map of Docker driver-specific options that are passed through.
--
-- 'scope', 'awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_scope' - The scope for the Docker volume that determines its lifecycle. Docker
-- volumes that are scoped to a task are provisioned automatically when the
-- task starts and destroyed when the task stops. Docker volumes that are
-- shared persist after the task stops.
--
-- 'labels', 'awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_labels' - Custom metadata to add to the Docker volume.
--
-- 'autoprovision', 'awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_autoprovision' - Whether to create the Docker volume automatically if it does not already
-- exist.
newAwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails ::
  AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
newAwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
newAwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails =
  AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails'
    { $sel:driver:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Text
driver =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:driverOpts:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe (HashMap Text Text)
driverOpts =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:scope:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Text
scope =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:labels:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe (HashMap Text Text)
labels =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:autoprovision:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Bool
autoprovision =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The Docker volume driver to use.
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driver :: Lens.Lens' AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driver :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driver = (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Maybe Text)
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> Maybe Text
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {Maybe Text
driver :: Maybe Text
$sel:driver:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
driver} -> Maybe Text
driver) (\s :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s@AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s {$sel:driver:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Text
driver = Maybe Text
a} :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)

-- | A map of Docker driver-specific options that are passed through.
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driverOpts :: Lens.Lens' AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driverOpts :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_driverOpts = (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Maybe (HashMap Text Text))
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> Maybe (HashMap Text Text)
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     (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 (\AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {Maybe (HashMap Text Text)
driverOpts :: Maybe (HashMap Text Text)
$sel:driverOpts:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe (HashMap Text Text)
driverOpts} -> Maybe (HashMap Text Text)
driverOpts) (\s :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s@AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {} Maybe (HashMap Text Text)
a -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s {$sel:driverOpts:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe (HashMap Text Text)
driverOpts = Maybe (HashMap Text Text)
a} :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> ((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)))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
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 scope for the Docker volume that determines its lifecycle. Docker
-- volumes that are scoped to a task are provisioned automatically when the
-- task starts and destroyed when the task stops. Docker volumes that are
-- shared persist after the task stops.
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_scope :: Lens.Lens' AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_scope :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_scope = (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Maybe Text)
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> Maybe Text
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {Maybe Text
scope :: Maybe Text
$sel:scope:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
scope} -> Maybe Text
scope) (\s :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s@AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s {$sel:scope:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Text
scope = Maybe Text
a} :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)

-- | Custom metadata to add to the Docker volume.
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_labels :: Lens.Lens' AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_labels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_labels = (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Maybe (HashMap Text Text))
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> Maybe (HashMap Text Text)
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     (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 (\AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {Maybe (HashMap Text Text)
labels :: Maybe (HashMap Text Text)
$sel:labels:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe (HashMap Text Text)
labels} -> Maybe (HashMap Text Text)
labels) (\s :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s@AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {} Maybe (HashMap Text Text)
a -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s {$sel:labels:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe (HashMap Text Text)
labels = Maybe (HashMap Text Text)
a} :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> ((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)))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
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

-- | Whether to create the Docker volume automatically if it does not already
-- exist.
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_autoprovision :: Lens.Lens' AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails (Prelude.Maybe Prelude.Bool)
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_autoprovision :: (Maybe Bool -> f (Maybe Bool))
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> f AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
awsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails_autoprovision = (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Maybe Bool)
-> (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> Maybe Bool
    -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {Maybe Bool
autoprovision :: Maybe Bool
$sel:autoprovision:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Bool
autoprovision} -> Maybe Bool
autoprovision) (\s :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s@AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {} Maybe Bool
a -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
s {$sel:autoprovision:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: Maybe Bool
autoprovision = Maybe Bool
a} :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)

instance
  Core.FromJSON
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
  where
  parseJSON :: Value
-> Parser
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
parseJSON =
    String
-> (Object
    -> Parser
         AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Value
-> Parser
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails'
            (Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Bool
 -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
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
"Driver")
              Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
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
"DriverOpts" 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 Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Bool
      -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
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
"Scope")
              Parser
  (Maybe (HashMap Text Text)
   -> Maybe Bool
   -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Bool
      -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
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
"Labels" 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 Bool
   -> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Parser (Maybe Bool)
-> Parser
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
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
"Autoprovision")
      )

instance
  Prelude.Hashable
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails

instance
  Prelude.NFData
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails

instance
  Core.ToJSON
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
  where
  toJSON :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Value
toJSON
    AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
autoprovision :: Maybe Bool
labels :: Maybe (HashMap Text Text)
scope :: Maybe Text
driverOpts :: Maybe (HashMap Text Text)
driver :: Maybe Text
$sel:autoprovision:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Bool
$sel:labels:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe (HashMap Text Text)
$sel:scope:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
$sel:driverOpts:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe (HashMap Text Text)
$sel:driver:AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails' :: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (Text
"Driver" 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
driver,
              (Text
"DriverOpts" 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)
driverOpts,
              (Text
"Scope" 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
scope,
              (Text
"Labels" 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)
labels,
              (Text
"Autoprovision" 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
autoprovision
            ]
        )