{-# 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.ImageBuilder.Types.DistributionConfiguration
-- 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.ImageBuilder.Types.DistributionConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.Distribution
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A distribution configuration.
--
-- /See:/ 'newDistributionConfiguration' smart constructor.
data DistributionConfiguration = DistributionConfiguration'
  { -- | The Amazon Resource Name (ARN) of the distribution configuration.
    DistributionConfiguration -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date on which this distribution configuration was last updated.
    DistributionConfiguration -> Maybe Text
dateUpdated :: Prelude.Maybe Prelude.Text,
    -- | The date on which this distribution configuration was created.
    DistributionConfiguration -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The name of the distribution configuration.
    DistributionConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The description of the distribution configuration.
    DistributionConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The distribution objects that apply Region-specific settings for the
    -- deployment of the image to targeted Regions.
    DistributionConfiguration -> Maybe [Distribution]
distributions :: Prelude.Maybe [Distribution],
    -- | The tags of the distribution configuration.
    DistributionConfiguration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The maximum duration in minutes for this distribution configuration.
    DistributionConfiguration -> Natural
timeoutMinutes :: Prelude.Natural
  }
  deriving (DistributionConfiguration -> DistributionConfiguration -> Bool
(DistributionConfiguration -> DistributionConfiguration -> Bool)
-> (DistributionConfiguration -> DistributionConfiguration -> Bool)
-> Eq DistributionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DistributionConfiguration -> DistributionConfiguration -> Bool
$c/= :: DistributionConfiguration -> DistributionConfiguration -> Bool
== :: DistributionConfiguration -> DistributionConfiguration -> Bool
$c== :: DistributionConfiguration -> DistributionConfiguration -> Bool
Prelude.Eq, ReadPrec [DistributionConfiguration]
ReadPrec DistributionConfiguration
Int -> ReadS DistributionConfiguration
ReadS [DistributionConfiguration]
(Int -> ReadS DistributionConfiguration)
-> ReadS [DistributionConfiguration]
-> ReadPrec DistributionConfiguration
-> ReadPrec [DistributionConfiguration]
-> Read DistributionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DistributionConfiguration]
$creadListPrec :: ReadPrec [DistributionConfiguration]
readPrec :: ReadPrec DistributionConfiguration
$creadPrec :: ReadPrec DistributionConfiguration
readList :: ReadS [DistributionConfiguration]
$creadList :: ReadS [DistributionConfiguration]
readsPrec :: Int -> ReadS DistributionConfiguration
$creadsPrec :: Int -> ReadS DistributionConfiguration
Prelude.Read, Int -> DistributionConfiguration -> ShowS
[DistributionConfiguration] -> ShowS
DistributionConfiguration -> String
(Int -> DistributionConfiguration -> ShowS)
-> (DistributionConfiguration -> String)
-> ([DistributionConfiguration] -> ShowS)
-> Show DistributionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DistributionConfiguration] -> ShowS
$cshowList :: [DistributionConfiguration] -> ShowS
show :: DistributionConfiguration -> String
$cshow :: DistributionConfiguration -> String
showsPrec :: Int -> DistributionConfiguration -> ShowS
$cshowsPrec :: Int -> DistributionConfiguration -> ShowS
Prelude.Show, (forall x.
 DistributionConfiguration -> Rep DistributionConfiguration x)
-> (forall x.
    Rep DistributionConfiguration x -> DistributionConfiguration)
-> Generic DistributionConfiguration
forall x.
Rep DistributionConfiguration x -> DistributionConfiguration
forall x.
DistributionConfiguration -> Rep DistributionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DistributionConfiguration x -> DistributionConfiguration
$cfrom :: forall x.
DistributionConfiguration -> Rep DistributionConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DistributionConfiguration' 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:
--
-- 'arn', 'distributionConfiguration_arn' - The Amazon Resource Name (ARN) of the distribution configuration.
--
-- 'dateUpdated', 'distributionConfiguration_dateUpdated' - The date on which this distribution configuration was last updated.
--
-- 'dateCreated', 'distributionConfiguration_dateCreated' - The date on which this distribution configuration was created.
--
-- 'name', 'distributionConfiguration_name' - The name of the distribution configuration.
--
-- 'description', 'distributionConfiguration_description' - The description of the distribution configuration.
--
-- 'distributions', 'distributionConfiguration_distributions' - The distribution objects that apply Region-specific settings for the
-- deployment of the image to targeted Regions.
--
-- 'tags', 'distributionConfiguration_tags' - The tags of the distribution configuration.
--
-- 'timeoutMinutes', 'distributionConfiguration_timeoutMinutes' - The maximum duration in minutes for this distribution configuration.
newDistributionConfiguration ::
  -- | 'timeoutMinutes'
  Prelude.Natural ->
  DistributionConfiguration
newDistributionConfiguration :: Natural -> DistributionConfiguration
newDistributionConfiguration Natural
pTimeoutMinutes_ =
  DistributionConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Distribution]
-> Maybe (HashMap Text Text)
-> Natural
-> DistributionConfiguration
DistributionConfiguration'
    { $sel:arn:DistributionConfiguration' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateUpdated:DistributionConfiguration' :: Maybe Text
dateUpdated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:DistributionConfiguration' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DistributionConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DistributionConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:distributions:DistributionConfiguration' :: Maybe [Distribution]
distributions = Maybe [Distribution]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DistributionConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutMinutes:DistributionConfiguration' :: Natural
timeoutMinutes = Natural
pTimeoutMinutes_
    }

-- | The Amazon Resource Name (ARN) of the distribution configuration.
distributionConfiguration_arn :: Lens.Lens' DistributionConfiguration (Prelude.Maybe Prelude.Text)
distributionConfiguration_arn :: (Maybe Text -> f (Maybe Text))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_arn = (DistributionConfiguration -> Maybe Text)
-> (DistributionConfiguration
    -> Maybe Text -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Maybe Text
arn :: Maybe Text
$sel:arn:DistributionConfiguration' :: DistributionConfiguration -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe Text
a -> DistributionConfiguration
s {$sel:arn:DistributionConfiguration' :: Maybe Text
arn = Maybe Text
a} :: DistributionConfiguration)

-- | The date on which this distribution configuration was last updated.
distributionConfiguration_dateUpdated :: Lens.Lens' DistributionConfiguration (Prelude.Maybe Prelude.Text)
distributionConfiguration_dateUpdated :: (Maybe Text -> f (Maybe Text))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_dateUpdated = (DistributionConfiguration -> Maybe Text)
-> (DistributionConfiguration
    -> Maybe Text -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Maybe Text
dateUpdated :: Maybe Text
$sel:dateUpdated:DistributionConfiguration' :: DistributionConfiguration -> Maybe Text
dateUpdated} -> Maybe Text
dateUpdated) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe Text
a -> DistributionConfiguration
s {$sel:dateUpdated:DistributionConfiguration' :: Maybe Text
dateUpdated = Maybe Text
a} :: DistributionConfiguration)

-- | The date on which this distribution configuration was created.
distributionConfiguration_dateCreated :: Lens.Lens' DistributionConfiguration (Prelude.Maybe Prelude.Text)
distributionConfiguration_dateCreated :: (Maybe Text -> f (Maybe Text))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_dateCreated = (DistributionConfiguration -> Maybe Text)
-> (DistributionConfiguration
    -> Maybe Text -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:DistributionConfiguration' :: DistributionConfiguration -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe Text
a -> DistributionConfiguration
s {$sel:dateCreated:DistributionConfiguration' :: Maybe Text
dateCreated = Maybe Text
a} :: DistributionConfiguration)

-- | The name of the distribution configuration.
distributionConfiguration_name :: Lens.Lens' DistributionConfiguration (Prelude.Maybe Prelude.Text)
distributionConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_name = (DistributionConfiguration -> Maybe Text)
-> (DistributionConfiguration
    -> Maybe Text -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:DistributionConfiguration' :: DistributionConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe Text
a -> DistributionConfiguration
s {$sel:name:DistributionConfiguration' :: Maybe Text
name = Maybe Text
a} :: DistributionConfiguration)

-- | The description of the distribution configuration.
distributionConfiguration_description :: Lens.Lens' DistributionConfiguration (Prelude.Maybe Prelude.Text)
distributionConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_description = (DistributionConfiguration -> Maybe Text)
-> (DistributionConfiguration
    -> Maybe Text -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:DistributionConfiguration' :: DistributionConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe Text
a -> DistributionConfiguration
s {$sel:description:DistributionConfiguration' :: Maybe Text
description = Maybe Text
a} :: DistributionConfiguration)

-- | The distribution objects that apply Region-specific settings for the
-- deployment of the image to targeted Regions.
distributionConfiguration_distributions :: Lens.Lens' DistributionConfiguration (Prelude.Maybe [Distribution])
distributionConfiguration_distributions :: (Maybe [Distribution] -> f (Maybe [Distribution]))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_distributions = (DistributionConfiguration -> Maybe [Distribution])
-> (DistributionConfiguration
    -> Maybe [Distribution] -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (Maybe [Distribution])
     (Maybe [Distribution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Maybe [Distribution]
distributions :: Maybe [Distribution]
$sel:distributions:DistributionConfiguration' :: DistributionConfiguration -> Maybe [Distribution]
distributions} -> Maybe [Distribution]
distributions) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe [Distribution]
a -> DistributionConfiguration
s {$sel:distributions:DistributionConfiguration' :: Maybe [Distribution]
distributions = Maybe [Distribution]
a} :: DistributionConfiguration) ((Maybe [Distribution] -> f (Maybe [Distribution]))
 -> DistributionConfiguration -> f DistributionConfiguration)
-> ((Maybe [Distribution] -> f (Maybe [Distribution]))
    -> Maybe [Distribution] -> f (Maybe [Distribution]))
-> (Maybe [Distribution] -> f (Maybe [Distribution]))
-> DistributionConfiguration
-> f DistributionConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Distribution] [Distribution] [Distribution] [Distribution]
-> Iso
     (Maybe [Distribution])
     (Maybe [Distribution])
     (Maybe [Distribution])
     (Maybe [Distribution])
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 [Distribution] [Distribution] [Distribution] [Distribution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tags of the distribution configuration.
distributionConfiguration_tags :: Lens.Lens' DistributionConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
distributionConfiguration_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_tags = (DistributionConfiguration -> Maybe (HashMap Text Text))
-> (DistributionConfiguration
    -> Maybe (HashMap Text Text) -> DistributionConfiguration)
-> Lens
     DistributionConfiguration
     DistributionConfiguration
     (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 (\DistributionConfiguration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DistributionConfiguration' :: DistributionConfiguration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Maybe (HashMap Text Text)
a -> DistributionConfiguration
s {$sel:tags:DistributionConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DistributionConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DistributionConfiguration -> f DistributionConfiguration)
-> ((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)))
-> DistributionConfiguration
-> f DistributionConfiguration
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 maximum duration in minutes for this distribution configuration.
distributionConfiguration_timeoutMinutes :: Lens.Lens' DistributionConfiguration Prelude.Natural
distributionConfiguration_timeoutMinutes :: (Natural -> f Natural)
-> DistributionConfiguration -> f DistributionConfiguration
distributionConfiguration_timeoutMinutes = (DistributionConfiguration -> Natural)
-> (DistributionConfiguration
    -> Natural -> DistributionConfiguration)
-> Lens
     DistributionConfiguration DistributionConfiguration Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfiguration' {Natural
timeoutMinutes :: Natural
$sel:timeoutMinutes:DistributionConfiguration' :: DistributionConfiguration -> Natural
timeoutMinutes} -> Natural
timeoutMinutes) (\s :: DistributionConfiguration
s@DistributionConfiguration' {} Natural
a -> DistributionConfiguration
s {$sel:timeoutMinutes:DistributionConfiguration' :: Natural
timeoutMinutes = Natural
a} :: DistributionConfiguration)

instance Core.FromJSON DistributionConfiguration where
  parseJSON :: Value -> Parser DistributionConfiguration
parseJSON =
    String
-> (Object -> Parser DistributionConfiguration)
-> Value
-> Parser DistributionConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DistributionConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Distribution]
-> Maybe (HashMap Text Text)
-> Natural
-> DistributionConfiguration
DistributionConfiguration'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Distribution]
 -> Maybe (HashMap Text Text)
 -> Natural
 -> DistributionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Distribution]
      -> Maybe (HashMap Text Text)
      -> Natural
      -> DistributionConfiguration)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Distribution]
   -> Maybe (HashMap Text Text)
   -> Natural
   -> DistributionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Distribution]
      -> Maybe (HashMap Text Text)
      -> Natural
      -> DistributionConfiguration)
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
"dateUpdated")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Distribution]
   -> Maybe (HashMap Text Text)
   -> Natural
   -> DistributionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Distribution]
      -> Maybe (HashMap Text Text)
      -> Natural
      -> DistributionConfiguration)
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
"dateCreated")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Distribution]
   -> Maybe (HashMap Text Text)
   -> Natural
   -> DistributionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Distribution]
      -> Maybe (HashMap Text Text)
      -> Natural
      -> DistributionConfiguration)
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 Text
   -> Maybe [Distribution]
   -> Maybe (HashMap Text Text)
   -> Natural
   -> DistributionConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Distribution]
      -> Maybe (HashMap Text Text)
      -> Natural
      -> DistributionConfiguration)
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
"description")
            Parser
  (Maybe [Distribution]
   -> Maybe (HashMap Text Text)
   -> Natural
   -> DistributionConfiguration)
-> Parser (Maybe [Distribution])
-> Parser
     (Maybe (HashMap Text Text) -> Natural -> DistributionConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Distribution]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"distributions" Parser (Maybe (Maybe [Distribution]))
-> Maybe [Distribution] -> Parser (Maybe [Distribution])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Distribution]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (HashMap Text Text) -> Natural -> DistributionConfiguration)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Natural -> DistributionConfiguration)
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
"tags" 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 (Natural -> DistributionConfiguration)
-> Parser Natural -> Parser DistributionConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"timeoutMinutes")
      )

instance Prelude.Hashable DistributionConfiguration

instance Prelude.NFData DistributionConfiguration