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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
import Amazonka.SecurityHub.Types.AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
import Amazonka.SecurityHub.Types.AwsEcsTaskDefinitionVolumesHostDetails

-- | A data volume to mount from another container.
--
-- /See:/ 'newAwsEcsTaskDefinitionVolumesDetails' smart constructor.
data AwsEcsTaskDefinitionVolumesDetails = AwsEcsTaskDefinitionVolumesDetails'
  { -- | Information about a Docker volume.
    AwsEcsTaskDefinitionVolumesDetails
-> Maybe
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration :: Prelude.Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails,
    -- | The name of the data volume.
    AwsEcsTaskDefinitionVolumesDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Information about the Amazon Elastic File System file system that is
    -- used for task storage.
    AwsEcsTaskDefinitionVolumesDetails
-> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration :: Prelude.Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails,
    -- | Information about a bind mount host volume.
    AwsEcsTaskDefinitionVolumesDetails
-> Maybe AwsEcsTaskDefinitionVolumesHostDetails
host :: Prelude.Maybe AwsEcsTaskDefinitionVolumesHostDetails
  }
  deriving (AwsEcsTaskDefinitionVolumesDetails
-> AwsEcsTaskDefinitionVolumesDetails -> Bool
(AwsEcsTaskDefinitionVolumesDetails
 -> AwsEcsTaskDefinitionVolumesDetails -> Bool)
-> (AwsEcsTaskDefinitionVolumesDetails
    -> AwsEcsTaskDefinitionVolumesDetails -> Bool)
-> Eq AwsEcsTaskDefinitionVolumesDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsTaskDefinitionVolumesDetails
-> AwsEcsTaskDefinitionVolumesDetails -> Bool
$c/= :: AwsEcsTaskDefinitionVolumesDetails
-> AwsEcsTaskDefinitionVolumesDetails -> Bool
== :: AwsEcsTaskDefinitionVolumesDetails
-> AwsEcsTaskDefinitionVolumesDetails -> Bool
$c== :: AwsEcsTaskDefinitionVolumesDetails
-> AwsEcsTaskDefinitionVolumesDetails -> Bool
Prelude.Eq, ReadPrec [AwsEcsTaskDefinitionVolumesDetails]
ReadPrec AwsEcsTaskDefinitionVolumesDetails
Int -> ReadS AwsEcsTaskDefinitionVolumesDetails
ReadS [AwsEcsTaskDefinitionVolumesDetails]
(Int -> ReadS AwsEcsTaskDefinitionVolumesDetails)
-> ReadS [AwsEcsTaskDefinitionVolumesDetails]
-> ReadPrec AwsEcsTaskDefinitionVolumesDetails
-> ReadPrec [AwsEcsTaskDefinitionVolumesDetails]
-> Read AwsEcsTaskDefinitionVolumesDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEcsTaskDefinitionVolumesDetails]
$creadListPrec :: ReadPrec [AwsEcsTaskDefinitionVolumesDetails]
readPrec :: ReadPrec AwsEcsTaskDefinitionVolumesDetails
$creadPrec :: ReadPrec AwsEcsTaskDefinitionVolumesDetails
readList :: ReadS [AwsEcsTaskDefinitionVolumesDetails]
$creadList :: ReadS [AwsEcsTaskDefinitionVolumesDetails]
readsPrec :: Int -> ReadS AwsEcsTaskDefinitionVolumesDetails
$creadsPrec :: Int -> ReadS AwsEcsTaskDefinitionVolumesDetails
Prelude.Read, Int -> AwsEcsTaskDefinitionVolumesDetails -> ShowS
[AwsEcsTaskDefinitionVolumesDetails] -> ShowS
AwsEcsTaskDefinitionVolumesDetails -> String
(Int -> AwsEcsTaskDefinitionVolumesDetails -> ShowS)
-> (AwsEcsTaskDefinitionVolumesDetails -> String)
-> ([AwsEcsTaskDefinitionVolumesDetails] -> ShowS)
-> Show AwsEcsTaskDefinitionVolumesDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsTaskDefinitionVolumesDetails] -> ShowS
$cshowList :: [AwsEcsTaskDefinitionVolumesDetails] -> ShowS
show :: AwsEcsTaskDefinitionVolumesDetails -> String
$cshow :: AwsEcsTaskDefinitionVolumesDetails -> String
showsPrec :: Int -> AwsEcsTaskDefinitionVolumesDetails -> ShowS
$cshowsPrec :: Int -> AwsEcsTaskDefinitionVolumesDetails -> ShowS
Prelude.Show, (forall x.
 AwsEcsTaskDefinitionVolumesDetails
 -> Rep AwsEcsTaskDefinitionVolumesDetails x)
-> (forall x.
    Rep AwsEcsTaskDefinitionVolumesDetails x
    -> AwsEcsTaskDefinitionVolumesDetails)
-> Generic AwsEcsTaskDefinitionVolumesDetails
forall x.
Rep AwsEcsTaskDefinitionVolumesDetails x
-> AwsEcsTaskDefinitionVolumesDetails
forall x.
AwsEcsTaskDefinitionVolumesDetails
-> Rep AwsEcsTaskDefinitionVolumesDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsTaskDefinitionVolumesDetails x
-> AwsEcsTaskDefinitionVolumesDetails
$cfrom :: forall x.
AwsEcsTaskDefinitionVolumesDetails
-> Rep AwsEcsTaskDefinitionVolumesDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsEcsTaskDefinitionVolumesDetails' 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:
--
-- 'dockerVolumeConfiguration', 'awsEcsTaskDefinitionVolumesDetails_dockerVolumeConfiguration' - Information about a Docker volume.
--
-- 'name', 'awsEcsTaskDefinitionVolumesDetails_name' - The name of the data volume.
--
-- 'efsVolumeConfiguration', 'awsEcsTaskDefinitionVolumesDetails_efsVolumeConfiguration' - Information about the Amazon Elastic File System file system that is
-- used for task storage.
--
-- 'host', 'awsEcsTaskDefinitionVolumesDetails_host' - Information about a bind mount host volume.
newAwsEcsTaskDefinitionVolumesDetails ::
  AwsEcsTaskDefinitionVolumesDetails
newAwsEcsTaskDefinitionVolumesDetails :: AwsEcsTaskDefinitionVolumesDetails
newAwsEcsTaskDefinitionVolumesDetails =
  AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
-> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
-> Maybe AwsEcsTaskDefinitionVolumesHostDetails
-> AwsEcsTaskDefinitionVolumesDetails
AwsEcsTaskDefinitionVolumesDetails'
    { $sel:dockerVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration =
        Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AwsEcsTaskDefinitionVolumesDetails' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:efsVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration =
        Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:host:AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesHostDetails
host = Maybe AwsEcsTaskDefinitionVolumesHostDetails
forall a. Maybe a
Prelude.Nothing
    }

-- | Information about a Docker volume.
awsEcsTaskDefinitionVolumesDetails_dockerVolumeConfiguration :: Lens.Lens' AwsEcsTaskDefinitionVolumesDetails (Prelude.Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
awsEcsTaskDefinitionVolumesDetails_dockerVolumeConfiguration :: (Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> f (Maybe
         AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails))
-> AwsEcsTaskDefinitionVolumesDetails
-> f AwsEcsTaskDefinitionVolumesDetails
awsEcsTaskDefinitionVolumesDetails_dockerVolumeConfiguration = (AwsEcsTaskDefinitionVolumesDetails
 -> Maybe
      AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> (AwsEcsTaskDefinitionVolumesDetails
    -> Maybe
         AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
    -> AwsEcsTaskDefinitionVolumesDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDetails
     AwsEcsTaskDefinitionVolumesDetails
     (Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
     (Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDetails' {Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration :: Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
$sel:dockerVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails
-> Maybe
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration} -> Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration) (\s :: AwsEcsTaskDefinitionVolumesDetails
s@AwsEcsTaskDefinitionVolumesDetails' {} Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
a -> AwsEcsTaskDefinitionVolumesDetails
s {$sel:dockerVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration = Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
a} :: AwsEcsTaskDefinitionVolumesDetails)

-- | The name of the data volume.
awsEcsTaskDefinitionVolumesDetails_name :: Lens.Lens' AwsEcsTaskDefinitionVolumesDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionVolumesDetails_name :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionVolumesDetails
-> f AwsEcsTaskDefinitionVolumesDetails
awsEcsTaskDefinitionVolumesDetails_name = (AwsEcsTaskDefinitionVolumesDetails -> Maybe Text)
-> (AwsEcsTaskDefinitionVolumesDetails
    -> Maybe Text -> AwsEcsTaskDefinitionVolumesDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDetails
     AwsEcsTaskDefinitionVolumesDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDetails' {Maybe Text
name :: Maybe Text
$sel:name:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: AwsEcsTaskDefinitionVolumesDetails
s@AwsEcsTaskDefinitionVolumesDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionVolumesDetails
s {$sel:name:AwsEcsTaskDefinitionVolumesDetails' :: Maybe Text
name = Maybe Text
a} :: AwsEcsTaskDefinitionVolumesDetails)

-- | Information about the Amazon Elastic File System file system that is
-- used for task storage.
awsEcsTaskDefinitionVolumesDetails_efsVolumeConfiguration :: Lens.Lens' AwsEcsTaskDefinitionVolumesDetails (Prelude.Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails)
awsEcsTaskDefinitionVolumesDetails_efsVolumeConfiguration :: (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
 -> f (Maybe
         AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails))
-> AwsEcsTaskDefinitionVolumesDetails
-> f AwsEcsTaskDefinitionVolumesDetails
awsEcsTaskDefinitionVolumesDetails_efsVolumeConfiguration = (AwsEcsTaskDefinitionVolumesDetails
 -> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails)
-> (AwsEcsTaskDefinitionVolumesDetails
    -> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
    -> AwsEcsTaskDefinitionVolumesDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDetails
     AwsEcsTaskDefinitionVolumesDetails
     (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails)
     (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDetails' {Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration :: Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
$sel:efsVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails
-> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration} -> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration) (\s :: AwsEcsTaskDefinitionVolumesDetails
s@AwsEcsTaskDefinitionVolumesDetails' {} Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
a -> AwsEcsTaskDefinitionVolumesDetails
s {$sel:efsVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration = Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
a} :: AwsEcsTaskDefinitionVolumesDetails)

-- | Information about a bind mount host volume.
awsEcsTaskDefinitionVolumesDetails_host :: Lens.Lens' AwsEcsTaskDefinitionVolumesDetails (Prelude.Maybe AwsEcsTaskDefinitionVolumesHostDetails)
awsEcsTaskDefinitionVolumesDetails_host :: (Maybe AwsEcsTaskDefinitionVolumesHostDetails
 -> f (Maybe AwsEcsTaskDefinitionVolumesHostDetails))
-> AwsEcsTaskDefinitionVolumesDetails
-> f AwsEcsTaskDefinitionVolumesDetails
awsEcsTaskDefinitionVolumesDetails_host = (AwsEcsTaskDefinitionVolumesDetails
 -> Maybe AwsEcsTaskDefinitionVolumesHostDetails)
-> (AwsEcsTaskDefinitionVolumesDetails
    -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
    -> AwsEcsTaskDefinitionVolumesDetails)
-> Lens
     AwsEcsTaskDefinitionVolumesDetails
     AwsEcsTaskDefinitionVolumesDetails
     (Maybe AwsEcsTaskDefinitionVolumesHostDetails)
     (Maybe AwsEcsTaskDefinitionVolumesHostDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionVolumesDetails' {Maybe AwsEcsTaskDefinitionVolumesHostDetails
host :: Maybe AwsEcsTaskDefinitionVolumesHostDetails
$sel:host:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails
-> Maybe AwsEcsTaskDefinitionVolumesHostDetails
host} -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
host) (\s :: AwsEcsTaskDefinitionVolumesDetails
s@AwsEcsTaskDefinitionVolumesDetails' {} Maybe AwsEcsTaskDefinitionVolumesHostDetails
a -> AwsEcsTaskDefinitionVolumesDetails
s {$sel:host:AwsEcsTaskDefinitionVolumesDetails' :: Maybe AwsEcsTaskDefinitionVolumesHostDetails
host = Maybe AwsEcsTaskDefinitionVolumesHostDetails
a} :: AwsEcsTaskDefinitionVolumesDetails)

instance
  Core.FromJSON
    AwsEcsTaskDefinitionVolumesDetails
  where
  parseJSON :: Value -> Parser AwsEcsTaskDefinitionVolumesDetails
parseJSON =
    String
-> (Object -> Parser AwsEcsTaskDefinitionVolumesDetails)
-> Value
-> Parser AwsEcsTaskDefinitionVolumesDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsEcsTaskDefinitionVolumesDetails"
      ( \Object
x ->
          Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Text
-> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
-> Maybe AwsEcsTaskDefinitionVolumesHostDetails
-> AwsEcsTaskDefinitionVolumesDetails
AwsEcsTaskDefinitionVolumesDetails'
            (Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Maybe Text
 -> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
 -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
 -> AwsEcsTaskDefinitionVolumesDetails)
-> Parser
     (Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
-> Parser
     (Maybe Text
      -> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
      -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
      -> AwsEcsTaskDefinitionVolumesDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Parser
     (Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DockerVolumeConfiguration")
            Parser
  (Maybe Text
   -> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
   -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
   -> AwsEcsTaskDefinitionVolumesDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
      -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
      -> AwsEcsTaskDefinitionVolumesDetails)
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
"Name")
            Parser
  (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
   -> Maybe AwsEcsTaskDefinitionVolumesHostDetails
   -> AwsEcsTaskDefinitionVolumesDetails)
-> Parser
     (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails)
-> Parser
     (Maybe AwsEcsTaskDefinitionVolumesHostDetails
      -> AwsEcsTaskDefinitionVolumesDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EfsVolumeConfiguration")
            Parser
  (Maybe AwsEcsTaskDefinitionVolumesHostDetails
   -> AwsEcsTaskDefinitionVolumesDetails)
-> Parser (Maybe AwsEcsTaskDefinitionVolumesHostDetails)
-> Parser AwsEcsTaskDefinitionVolumesDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe AwsEcsTaskDefinitionVolumesHostDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Host")
      )

instance
  Prelude.Hashable
    AwsEcsTaskDefinitionVolumesDetails

instance
  Prelude.NFData
    AwsEcsTaskDefinitionVolumesDetails

instance
  Core.ToJSON
    AwsEcsTaskDefinitionVolumesDetails
  where
  toJSON :: AwsEcsTaskDefinitionVolumesDetails -> Value
toJSON AwsEcsTaskDefinitionVolumesDetails' {Maybe Text
Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
Maybe AwsEcsTaskDefinitionVolumesHostDetails
host :: Maybe AwsEcsTaskDefinitionVolumesHostDetails
efsVolumeConfiguration :: Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
name :: Maybe Text
dockerVolumeConfiguration :: Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
$sel:host:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails
-> Maybe AwsEcsTaskDefinitionVolumesHostDetails
$sel:efsVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails
-> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
$sel:name:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails -> Maybe Text
$sel:dockerVolumeConfiguration:AwsEcsTaskDefinitionVolumesDetails' :: AwsEcsTaskDefinitionVolumesDetails
-> Maybe
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DockerVolumeConfiguration" Text
-> AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
 -> Pair)
-> Maybe
     AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails
dockerVolumeConfiguration,
            (Text
"Name" 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
name,
            (Text
"EfsVolumeConfiguration" Text
-> AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails -> Pair)
-> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails
efsVolumeConfiguration,
            (Text
"Host" Text -> AwsEcsTaskDefinitionVolumesHostDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsEcsTaskDefinitionVolumesHostDetails -> Pair)
-> Maybe AwsEcsTaskDefinitionVolumesHostDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsEcsTaskDefinitionVolumesHostDetails
host
          ]
      )