{-# 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.ECS.Types.DockerVolumeConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ECS.Types.DockerVolumeConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECS.Types.Scope
import qualified Amazonka.Prelude as Prelude

-- | This parameter is specified when you\'re using Docker volumes. Docker
-- volumes are only supported when you\'re using the EC2 launch type.
-- Windows containers only support the use of the @local@ driver. To use
-- bind mounts, specify a @host@ instead.
--
-- /See:/ 'newDockerVolumeConfiguration' smart constructor.
data DockerVolumeConfiguration = DockerVolumeConfiguration'
  { -- | If this value is @true@, the Docker volume is created if it doesn\'t
    -- already exist.
    --
    -- This field is only used if the @scope@ is @shared@.
    DockerVolumeConfiguration -> Maybe Bool
autoprovision :: Prelude.Maybe Prelude.Bool,
    -- | The Docker volume driver to use. The driver value must match the driver
    -- name provided by Docker because it is used for task placement. If the
    -- driver was installed using the Docker plugin CLI, use @docker plugin ls@
    -- to retrieve the driver name from your container instance. If the driver
    -- was installed using another method, use Docker plugin discovery to
    -- retrieve the driver name. For more information, see
    -- <https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery Docker plugin discovery>.
    -- This parameter maps to @Driver@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @xxdriver@ option to
    -- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
    DockerVolumeConfiguration -> Maybe Text
driver :: Prelude.Maybe Prelude.Text,
    -- | A map of Docker driver-specific options passed through. This parameter
    -- maps to @DriverOpts@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @xxopt@ option to
    -- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
    DockerVolumeConfiguration -> Maybe (HashMap Text Text)
driverOpts :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Custom metadata to add to your Docker volume. This parameter maps to
    -- @Labels@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @xxlabel@ option to
    -- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
    DockerVolumeConfiguration -> Maybe (HashMap Text Text)
labels :: 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 automatically provisioned when
    -- the task starts and destroyed when the task stops. Docker volumes that
    -- are scoped as @shared@ persist after the task stops.
    DockerVolumeConfiguration -> Maybe Scope
scope :: Prelude.Maybe Scope
  }
  deriving (DockerVolumeConfiguration -> DockerVolumeConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DockerVolumeConfiguration -> DockerVolumeConfiguration -> Bool
$c/= :: DockerVolumeConfiguration -> DockerVolumeConfiguration -> Bool
== :: DockerVolumeConfiguration -> DockerVolumeConfiguration -> Bool
$c== :: DockerVolumeConfiguration -> DockerVolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [DockerVolumeConfiguration]
ReadPrec DockerVolumeConfiguration
Int -> ReadS DockerVolumeConfiguration
ReadS [DockerVolumeConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DockerVolumeConfiguration]
$creadListPrec :: ReadPrec [DockerVolumeConfiguration]
readPrec :: ReadPrec DockerVolumeConfiguration
$creadPrec :: ReadPrec DockerVolumeConfiguration
readList :: ReadS [DockerVolumeConfiguration]
$creadList :: ReadS [DockerVolumeConfiguration]
readsPrec :: Int -> ReadS DockerVolumeConfiguration
$creadsPrec :: Int -> ReadS DockerVolumeConfiguration
Prelude.Read, Int -> DockerVolumeConfiguration -> ShowS
[DockerVolumeConfiguration] -> ShowS
DockerVolumeConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DockerVolumeConfiguration] -> ShowS
$cshowList :: [DockerVolumeConfiguration] -> ShowS
show :: DockerVolumeConfiguration -> String
$cshow :: DockerVolumeConfiguration -> String
showsPrec :: Int -> DockerVolumeConfiguration -> ShowS
$cshowsPrec :: Int -> DockerVolumeConfiguration -> ShowS
Prelude.Show, forall x.
Rep DockerVolumeConfiguration x -> DockerVolumeConfiguration
forall x.
DockerVolumeConfiguration -> Rep DockerVolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DockerVolumeConfiguration x -> DockerVolumeConfiguration
$cfrom :: forall x.
DockerVolumeConfiguration -> Rep DockerVolumeConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DockerVolumeConfiguration' 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:
--
-- 'autoprovision', 'dockerVolumeConfiguration_autoprovision' - If this value is @true@, the Docker volume is created if it doesn\'t
-- already exist.
--
-- This field is only used if the @scope@ is @shared@.
--
-- 'driver', 'dockerVolumeConfiguration_driver' - The Docker volume driver to use. The driver value must match the driver
-- name provided by Docker because it is used for task placement. If the
-- driver was installed using the Docker plugin CLI, use @docker plugin ls@
-- to retrieve the driver name from your container instance. If the driver
-- was installed using another method, use Docker plugin discovery to
-- retrieve the driver name. For more information, see
-- <https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery Docker plugin discovery>.
-- This parameter maps to @Driver@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @xxdriver@ option to
-- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
--
-- 'driverOpts', 'dockerVolumeConfiguration_driverOpts' - A map of Docker driver-specific options passed through. This parameter
-- maps to @DriverOpts@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @xxopt@ option to
-- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
--
-- 'labels', 'dockerVolumeConfiguration_labels' - Custom metadata to add to your Docker volume. This parameter maps to
-- @Labels@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @xxlabel@ option to
-- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
--
-- 'scope', 'dockerVolumeConfiguration_scope' - The scope for the Docker volume that determines its lifecycle. Docker
-- volumes that are scoped to a @task@ are automatically provisioned when
-- the task starts and destroyed when the task stops. Docker volumes that
-- are scoped as @shared@ persist after the task stops.
newDockerVolumeConfiguration ::
  DockerVolumeConfiguration
newDockerVolumeConfiguration :: DockerVolumeConfiguration
newDockerVolumeConfiguration =
  DockerVolumeConfiguration'
    { $sel:autoprovision:DockerVolumeConfiguration' :: Maybe Bool
autoprovision =
        forall a. Maybe a
Prelude.Nothing,
      $sel:driver:DockerVolumeConfiguration' :: Maybe Text
driver = forall a. Maybe a
Prelude.Nothing,
      $sel:driverOpts:DockerVolumeConfiguration' :: Maybe (HashMap Text Text)
driverOpts = forall a. Maybe a
Prelude.Nothing,
      $sel:labels:DockerVolumeConfiguration' :: Maybe (HashMap Text Text)
labels = forall a. Maybe a
Prelude.Nothing,
      $sel:scope:DockerVolumeConfiguration' :: Maybe Scope
scope = forall a. Maybe a
Prelude.Nothing
    }

-- | If this value is @true@, the Docker volume is created if it doesn\'t
-- already exist.
--
-- This field is only used if the @scope@ is @shared@.
dockerVolumeConfiguration_autoprovision :: Lens.Lens' DockerVolumeConfiguration (Prelude.Maybe Prelude.Bool)
dockerVolumeConfiguration_autoprovision :: Lens' DockerVolumeConfiguration (Maybe Bool)
dockerVolumeConfiguration_autoprovision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DockerVolumeConfiguration' {Maybe Bool
autoprovision :: Maybe Bool
$sel:autoprovision:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Bool
autoprovision} -> Maybe Bool
autoprovision) (\s :: DockerVolumeConfiguration
s@DockerVolumeConfiguration' {} Maybe Bool
a -> DockerVolumeConfiguration
s {$sel:autoprovision:DockerVolumeConfiguration' :: Maybe Bool
autoprovision = Maybe Bool
a} :: DockerVolumeConfiguration)

-- | The Docker volume driver to use. The driver value must match the driver
-- name provided by Docker because it is used for task placement. If the
-- driver was installed using the Docker plugin CLI, use @docker plugin ls@
-- to retrieve the driver name from your container instance. If the driver
-- was installed using another method, use Docker plugin discovery to
-- retrieve the driver name. For more information, see
-- <https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery Docker plugin discovery>.
-- This parameter maps to @Driver@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @xxdriver@ option to
-- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
dockerVolumeConfiguration_driver :: Lens.Lens' DockerVolumeConfiguration (Prelude.Maybe Prelude.Text)
dockerVolumeConfiguration_driver :: Lens' DockerVolumeConfiguration (Maybe Text)
dockerVolumeConfiguration_driver = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DockerVolumeConfiguration' {Maybe Text
driver :: Maybe Text
$sel:driver:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Text
driver} -> Maybe Text
driver) (\s :: DockerVolumeConfiguration
s@DockerVolumeConfiguration' {} Maybe Text
a -> DockerVolumeConfiguration
s {$sel:driver:DockerVolumeConfiguration' :: Maybe Text
driver = Maybe Text
a} :: DockerVolumeConfiguration)

-- | A map of Docker driver-specific options passed through. This parameter
-- maps to @DriverOpts@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @xxopt@ option to
-- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
dockerVolumeConfiguration_driverOpts :: Lens.Lens' DockerVolumeConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
dockerVolumeConfiguration_driverOpts :: Lens' DockerVolumeConfiguration (Maybe (HashMap Text Text))
dockerVolumeConfiguration_driverOpts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DockerVolumeConfiguration' {Maybe (HashMap Text Text)
driverOpts :: Maybe (HashMap Text Text)
$sel:driverOpts:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
driverOpts} -> Maybe (HashMap Text Text)
driverOpts) (\s :: DockerVolumeConfiguration
s@DockerVolumeConfiguration' {} Maybe (HashMap Text Text)
a -> DockerVolumeConfiguration
s {$sel:driverOpts:DockerVolumeConfiguration' :: Maybe (HashMap Text Text)
driverOpts = Maybe (HashMap Text Text)
a} :: DockerVolumeConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Custom metadata to add to your Docker volume. This parameter maps to
-- @Labels@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate Create a volume>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @xxlabel@ option to
-- <https://docs.docker.com/engine/reference/commandline/volume_create/ docker volume create>.
dockerVolumeConfiguration_labels :: Lens.Lens' DockerVolumeConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
dockerVolumeConfiguration_labels :: Lens' DockerVolumeConfiguration (Maybe (HashMap Text Text))
dockerVolumeConfiguration_labels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DockerVolumeConfiguration' {Maybe (HashMap Text Text)
labels :: Maybe (HashMap Text Text)
$sel:labels:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
labels} -> Maybe (HashMap Text Text)
labels) (\s :: DockerVolumeConfiguration
s@DockerVolumeConfiguration' {} Maybe (HashMap Text Text)
a -> DockerVolumeConfiguration
s {$sel:labels:DockerVolumeConfiguration' :: Maybe (HashMap Text Text)
labels = Maybe (HashMap Text Text)
a} :: DockerVolumeConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 automatically provisioned when
-- the task starts and destroyed when the task stops. Docker volumes that
-- are scoped as @shared@ persist after the task stops.
dockerVolumeConfiguration_scope :: Lens.Lens' DockerVolumeConfiguration (Prelude.Maybe Scope)
dockerVolumeConfiguration_scope :: Lens' DockerVolumeConfiguration (Maybe Scope)
dockerVolumeConfiguration_scope = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DockerVolumeConfiguration' {Maybe Scope
scope :: Maybe Scope
$sel:scope:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Scope
scope} -> Maybe Scope
scope) (\s :: DockerVolumeConfiguration
s@DockerVolumeConfiguration' {} Maybe Scope
a -> DockerVolumeConfiguration
s {$sel:scope:DockerVolumeConfiguration' :: Maybe Scope
scope = Maybe Scope
a} :: DockerVolumeConfiguration)

instance Data.FromJSON DockerVolumeConfiguration where
  parseJSON :: Value -> Parser DockerVolumeConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DockerVolumeConfiguration"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe Scope
-> DockerVolumeConfiguration
DockerVolumeConfiguration'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"autoprovision")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"driver")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"driverOpts" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"labels" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"scope")
      )

instance Prelude.Hashable DockerVolumeConfiguration where
  hashWithSalt :: Int -> DockerVolumeConfiguration -> Int
hashWithSalt Int
_salt DockerVolumeConfiguration' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe Scope
scope :: Maybe Scope
labels :: Maybe (HashMap Text Text)
driverOpts :: Maybe (HashMap Text Text)
driver :: Maybe Text
autoprovision :: Maybe Bool
$sel:scope:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Scope
$sel:labels:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
$sel:driverOpts:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
$sel:driver:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Text
$sel:autoprovision:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoprovision
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
driver
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
driverOpts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
labels
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Scope
scope

instance Prelude.NFData DockerVolumeConfiguration where
  rnf :: DockerVolumeConfiguration -> ()
rnf DockerVolumeConfiguration' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe Scope
scope :: Maybe Scope
labels :: Maybe (HashMap Text Text)
driverOpts :: Maybe (HashMap Text Text)
driver :: Maybe Text
autoprovision :: Maybe Bool
$sel:scope:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Scope
$sel:labels:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
$sel:driverOpts:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
$sel:driver:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Text
$sel:autoprovision:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoprovision
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
driver
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
driverOpts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
labels
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Scope
scope

instance Data.ToJSON DockerVolumeConfiguration where
  toJSON :: DockerVolumeConfiguration -> Value
toJSON DockerVolumeConfiguration' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe Scope
scope :: Maybe Scope
labels :: Maybe (HashMap Text Text)
driverOpts :: Maybe (HashMap Text Text)
driver :: Maybe Text
autoprovision :: Maybe Bool
$sel:scope:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Scope
$sel:labels:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
$sel:driverOpts:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe (HashMap Text Text)
$sel:driver:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Text
$sel:autoprovision:DockerVolumeConfiguration' :: DockerVolumeConfiguration -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"autoprovision" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
autoprovision,
            (Key
"driver" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
driver,
            (Key
"driverOpts" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
driverOpts,
            (Key
"labels" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
labels,
            (Key
"scope" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scope
scope
          ]
      )