{-# 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 #-}
module Amazonka.KinesisAnalyticsV2.Types.EnvironmentProperties where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.PropertyGroup
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EnvironmentProperties = EnvironmentProperties'
{
EnvironmentProperties -> [PropertyGroup]
propertyGroups :: [PropertyGroup]
}
deriving (EnvironmentProperties -> EnvironmentProperties -> Bool
(EnvironmentProperties -> EnvironmentProperties -> Bool)
-> (EnvironmentProperties -> EnvironmentProperties -> Bool)
-> Eq EnvironmentProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentProperties -> EnvironmentProperties -> Bool
$c/= :: EnvironmentProperties -> EnvironmentProperties -> Bool
== :: EnvironmentProperties -> EnvironmentProperties -> Bool
$c== :: EnvironmentProperties -> EnvironmentProperties -> Bool
Prelude.Eq, ReadPrec [EnvironmentProperties]
ReadPrec EnvironmentProperties
Int -> ReadS EnvironmentProperties
ReadS [EnvironmentProperties]
(Int -> ReadS EnvironmentProperties)
-> ReadS [EnvironmentProperties]
-> ReadPrec EnvironmentProperties
-> ReadPrec [EnvironmentProperties]
-> Read EnvironmentProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnvironmentProperties]
$creadListPrec :: ReadPrec [EnvironmentProperties]
readPrec :: ReadPrec EnvironmentProperties
$creadPrec :: ReadPrec EnvironmentProperties
readList :: ReadS [EnvironmentProperties]
$creadList :: ReadS [EnvironmentProperties]
readsPrec :: Int -> ReadS EnvironmentProperties
$creadsPrec :: Int -> ReadS EnvironmentProperties
Prelude.Read, Int -> EnvironmentProperties -> ShowS
[EnvironmentProperties] -> ShowS
EnvironmentProperties -> String
(Int -> EnvironmentProperties -> ShowS)
-> (EnvironmentProperties -> String)
-> ([EnvironmentProperties] -> ShowS)
-> Show EnvironmentProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnvironmentProperties] -> ShowS
$cshowList :: [EnvironmentProperties] -> ShowS
show :: EnvironmentProperties -> String
$cshow :: EnvironmentProperties -> String
showsPrec :: Int -> EnvironmentProperties -> ShowS
$cshowsPrec :: Int -> EnvironmentProperties -> ShowS
Prelude.Show, (forall x. EnvironmentProperties -> Rep EnvironmentProperties x)
-> (forall x. Rep EnvironmentProperties x -> EnvironmentProperties)
-> Generic EnvironmentProperties
forall x. Rep EnvironmentProperties x -> EnvironmentProperties
forall x. EnvironmentProperties -> Rep EnvironmentProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnvironmentProperties x -> EnvironmentProperties
$cfrom :: forall x. EnvironmentProperties -> Rep EnvironmentProperties x
Prelude.Generic)
newEnvironmentProperties ::
EnvironmentProperties
newEnvironmentProperties :: EnvironmentProperties
newEnvironmentProperties =
EnvironmentProperties' :: [PropertyGroup] -> EnvironmentProperties
EnvironmentProperties'
{ $sel:propertyGroups:EnvironmentProperties' :: [PropertyGroup]
propertyGroups =
[PropertyGroup]
forall a. Monoid a => a
Prelude.mempty
}
environmentProperties_propertyGroups :: Lens.Lens' EnvironmentProperties [PropertyGroup]
environmentProperties_propertyGroups :: ([PropertyGroup] -> f [PropertyGroup])
-> EnvironmentProperties -> f EnvironmentProperties
environmentProperties_propertyGroups = (EnvironmentProperties -> [PropertyGroup])
-> (EnvironmentProperties
-> [PropertyGroup] -> EnvironmentProperties)
-> Lens
EnvironmentProperties
EnvironmentProperties
[PropertyGroup]
[PropertyGroup]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentProperties' {[PropertyGroup]
propertyGroups :: [PropertyGroup]
$sel:propertyGroups:EnvironmentProperties' :: EnvironmentProperties -> [PropertyGroup]
propertyGroups} -> [PropertyGroup]
propertyGroups) (\s :: EnvironmentProperties
s@EnvironmentProperties' {} [PropertyGroup]
a -> EnvironmentProperties
s {$sel:propertyGroups:EnvironmentProperties' :: [PropertyGroup]
propertyGroups = [PropertyGroup]
a} :: EnvironmentProperties) (([PropertyGroup] -> f [PropertyGroup])
-> EnvironmentProperties -> f EnvironmentProperties)
-> (([PropertyGroup] -> f [PropertyGroup])
-> [PropertyGroup] -> f [PropertyGroup])
-> ([PropertyGroup] -> f [PropertyGroup])
-> EnvironmentProperties
-> f EnvironmentProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([PropertyGroup] -> f [PropertyGroup])
-> [PropertyGroup] -> f [PropertyGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable EnvironmentProperties
instance Prelude.NFData EnvironmentProperties
instance Core.ToJSON EnvironmentProperties where
toJSON :: EnvironmentProperties -> Value
toJSON EnvironmentProperties' {[PropertyGroup]
propertyGroups :: [PropertyGroup]
$sel:propertyGroups:EnvironmentProperties' :: EnvironmentProperties -> [PropertyGroup]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"PropertyGroups" Text -> [PropertyGroup] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [PropertyGroup]
propertyGroups)
]
)