{-# 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.KinesisAnalyticsV2.Types.EnvironmentPropertyDescriptions
-- 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.KinesisAnalyticsV2.Types.EnvironmentPropertyDescriptions where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.PropertyGroup
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the execution properties for an Apache Flink runtime.
--
-- /See:/ 'newEnvironmentPropertyDescriptions' smart constructor.
data EnvironmentPropertyDescriptions = EnvironmentPropertyDescriptions'
  { -- | Describes the execution property groups.
    EnvironmentPropertyDescriptions -> Maybe [PropertyGroup]
propertyGroupDescriptions :: Prelude.Maybe [PropertyGroup]
  }
  deriving (EnvironmentPropertyDescriptions
-> EnvironmentPropertyDescriptions -> Bool
(EnvironmentPropertyDescriptions
 -> EnvironmentPropertyDescriptions -> Bool)
-> (EnvironmentPropertyDescriptions
    -> EnvironmentPropertyDescriptions -> Bool)
-> Eq EnvironmentPropertyDescriptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentPropertyDescriptions
-> EnvironmentPropertyDescriptions -> Bool
$c/= :: EnvironmentPropertyDescriptions
-> EnvironmentPropertyDescriptions -> Bool
== :: EnvironmentPropertyDescriptions
-> EnvironmentPropertyDescriptions -> Bool
$c== :: EnvironmentPropertyDescriptions
-> EnvironmentPropertyDescriptions -> Bool
Prelude.Eq, ReadPrec [EnvironmentPropertyDescriptions]
ReadPrec EnvironmentPropertyDescriptions
Int -> ReadS EnvironmentPropertyDescriptions
ReadS [EnvironmentPropertyDescriptions]
(Int -> ReadS EnvironmentPropertyDescriptions)
-> ReadS [EnvironmentPropertyDescriptions]
-> ReadPrec EnvironmentPropertyDescriptions
-> ReadPrec [EnvironmentPropertyDescriptions]
-> Read EnvironmentPropertyDescriptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnvironmentPropertyDescriptions]
$creadListPrec :: ReadPrec [EnvironmentPropertyDescriptions]
readPrec :: ReadPrec EnvironmentPropertyDescriptions
$creadPrec :: ReadPrec EnvironmentPropertyDescriptions
readList :: ReadS [EnvironmentPropertyDescriptions]
$creadList :: ReadS [EnvironmentPropertyDescriptions]
readsPrec :: Int -> ReadS EnvironmentPropertyDescriptions
$creadsPrec :: Int -> ReadS EnvironmentPropertyDescriptions
Prelude.Read, Int -> EnvironmentPropertyDescriptions -> ShowS
[EnvironmentPropertyDescriptions] -> ShowS
EnvironmentPropertyDescriptions -> String
(Int -> EnvironmentPropertyDescriptions -> ShowS)
-> (EnvironmentPropertyDescriptions -> String)
-> ([EnvironmentPropertyDescriptions] -> ShowS)
-> Show EnvironmentPropertyDescriptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnvironmentPropertyDescriptions] -> ShowS
$cshowList :: [EnvironmentPropertyDescriptions] -> ShowS
show :: EnvironmentPropertyDescriptions -> String
$cshow :: EnvironmentPropertyDescriptions -> String
showsPrec :: Int -> EnvironmentPropertyDescriptions -> ShowS
$cshowsPrec :: Int -> EnvironmentPropertyDescriptions -> ShowS
Prelude.Show, (forall x.
 EnvironmentPropertyDescriptions
 -> Rep EnvironmentPropertyDescriptions x)
-> (forall x.
    Rep EnvironmentPropertyDescriptions x
    -> EnvironmentPropertyDescriptions)
-> Generic EnvironmentPropertyDescriptions
forall x.
Rep EnvironmentPropertyDescriptions x
-> EnvironmentPropertyDescriptions
forall x.
EnvironmentPropertyDescriptions
-> Rep EnvironmentPropertyDescriptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnvironmentPropertyDescriptions x
-> EnvironmentPropertyDescriptions
$cfrom :: forall x.
EnvironmentPropertyDescriptions
-> Rep EnvironmentPropertyDescriptions x
Prelude.Generic)

-- |
-- Create a value of 'EnvironmentPropertyDescriptions' 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:
--
-- 'propertyGroupDescriptions', 'environmentPropertyDescriptions_propertyGroupDescriptions' - Describes the execution property groups.
newEnvironmentPropertyDescriptions ::
  EnvironmentPropertyDescriptions
newEnvironmentPropertyDescriptions :: EnvironmentPropertyDescriptions
newEnvironmentPropertyDescriptions =
  EnvironmentPropertyDescriptions' :: Maybe [PropertyGroup] -> EnvironmentPropertyDescriptions
EnvironmentPropertyDescriptions'
    { $sel:propertyGroupDescriptions:EnvironmentPropertyDescriptions' :: Maybe [PropertyGroup]
propertyGroupDescriptions =
        Maybe [PropertyGroup]
forall a. Maybe a
Prelude.Nothing
    }

-- | Describes the execution property groups.
environmentPropertyDescriptions_propertyGroupDescriptions :: Lens.Lens' EnvironmentPropertyDescriptions (Prelude.Maybe [PropertyGroup])
environmentPropertyDescriptions_propertyGroupDescriptions :: (Maybe [PropertyGroup] -> f (Maybe [PropertyGroup]))
-> EnvironmentPropertyDescriptions
-> f EnvironmentPropertyDescriptions
environmentPropertyDescriptions_propertyGroupDescriptions = (EnvironmentPropertyDescriptions -> Maybe [PropertyGroup])
-> (EnvironmentPropertyDescriptions
    -> Maybe [PropertyGroup] -> EnvironmentPropertyDescriptions)
-> Lens
     EnvironmentPropertyDescriptions
     EnvironmentPropertyDescriptions
     (Maybe [PropertyGroup])
     (Maybe [PropertyGroup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentPropertyDescriptions' {Maybe [PropertyGroup]
propertyGroupDescriptions :: Maybe [PropertyGroup]
$sel:propertyGroupDescriptions:EnvironmentPropertyDescriptions' :: EnvironmentPropertyDescriptions -> Maybe [PropertyGroup]
propertyGroupDescriptions} -> Maybe [PropertyGroup]
propertyGroupDescriptions) (\s :: EnvironmentPropertyDescriptions
s@EnvironmentPropertyDescriptions' {} Maybe [PropertyGroup]
a -> EnvironmentPropertyDescriptions
s {$sel:propertyGroupDescriptions:EnvironmentPropertyDescriptions' :: Maybe [PropertyGroup]
propertyGroupDescriptions = Maybe [PropertyGroup]
a} :: EnvironmentPropertyDescriptions) ((Maybe [PropertyGroup] -> f (Maybe [PropertyGroup]))
 -> EnvironmentPropertyDescriptions
 -> f EnvironmentPropertyDescriptions)
-> ((Maybe [PropertyGroup] -> f (Maybe [PropertyGroup]))
    -> Maybe [PropertyGroup] -> f (Maybe [PropertyGroup]))
-> (Maybe [PropertyGroup] -> f (Maybe [PropertyGroup]))
-> EnvironmentPropertyDescriptions
-> f EnvironmentPropertyDescriptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PropertyGroup] [PropertyGroup] [PropertyGroup] [PropertyGroup]
-> Iso
     (Maybe [PropertyGroup])
     (Maybe [PropertyGroup])
     (Maybe [PropertyGroup])
     (Maybe [PropertyGroup])
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
  [PropertyGroup] [PropertyGroup] [PropertyGroup] [PropertyGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.FromJSON
    EnvironmentPropertyDescriptions
  where
  parseJSON :: Value -> Parser EnvironmentPropertyDescriptions
parseJSON =
    String
-> (Object -> Parser EnvironmentPropertyDescriptions)
-> Value
-> Parser EnvironmentPropertyDescriptions
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EnvironmentPropertyDescriptions"
      ( \Object
x ->
          Maybe [PropertyGroup] -> EnvironmentPropertyDescriptions
EnvironmentPropertyDescriptions'
            (Maybe [PropertyGroup] -> EnvironmentPropertyDescriptions)
-> Parser (Maybe [PropertyGroup])
-> Parser EnvironmentPropertyDescriptions
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PropertyGroup]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PropertyGroupDescriptions"
                            Parser (Maybe (Maybe [PropertyGroup]))
-> Maybe [PropertyGroup] -> Parser (Maybe [PropertyGroup])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PropertyGroup]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    EnvironmentPropertyDescriptions

instance
  Prelude.NFData
    EnvironmentPropertyDescriptions