{-# 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.EnvironmentPropertyUpdates 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 EnvironmentPropertyUpdates = EnvironmentPropertyUpdates'
{
EnvironmentPropertyUpdates -> [PropertyGroup]
propertyGroups :: [PropertyGroup]
}
deriving (EnvironmentPropertyUpdates -> EnvironmentPropertyUpdates -> Bool
(EnvironmentPropertyUpdates -> EnvironmentPropertyUpdates -> Bool)
-> (EnvironmentPropertyUpdates
-> EnvironmentPropertyUpdates -> Bool)
-> Eq EnvironmentPropertyUpdates
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnvironmentPropertyUpdates -> EnvironmentPropertyUpdates -> Bool
$c/= :: EnvironmentPropertyUpdates -> EnvironmentPropertyUpdates -> Bool
== :: EnvironmentPropertyUpdates -> EnvironmentPropertyUpdates -> Bool
$c== :: EnvironmentPropertyUpdates -> EnvironmentPropertyUpdates -> Bool
Prelude.Eq, ReadPrec [EnvironmentPropertyUpdates]
ReadPrec EnvironmentPropertyUpdates
Int -> ReadS EnvironmentPropertyUpdates
ReadS [EnvironmentPropertyUpdates]
(Int -> ReadS EnvironmentPropertyUpdates)
-> ReadS [EnvironmentPropertyUpdates]
-> ReadPrec EnvironmentPropertyUpdates
-> ReadPrec [EnvironmentPropertyUpdates]
-> Read EnvironmentPropertyUpdates
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnvironmentPropertyUpdates]
$creadListPrec :: ReadPrec [EnvironmentPropertyUpdates]
readPrec :: ReadPrec EnvironmentPropertyUpdates
$creadPrec :: ReadPrec EnvironmentPropertyUpdates
readList :: ReadS [EnvironmentPropertyUpdates]
$creadList :: ReadS [EnvironmentPropertyUpdates]
readsPrec :: Int -> ReadS EnvironmentPropertyUpdates
$creadsPrec :: Int -> ReadS EnvironmentPropertyUpdates
Prelude.Read, Int -> EnvironmentPropertyUpdates -> ShowS
[EnvironmentPropertyUpdates] -> ShowS
EnvironmentPropertyUpdates -> String
(Int -> EnvironmentPropertyUpdates -> ShowS)
-> (EnvironmentPropertyUpdates -> String)
-> ([EnvironmentPropertyUpdates] -> ShowS)
-> Show EnvironmentPropertyUpdates
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnvironmentPropertyUpdates] -> ShowS
$cshowList :: [EnvironmentPropertyUpdates] -> ShowS
show :: EnvironmentPropertyUpdates -> String
$cshow :: EnvironmentPropertyUpdates -> String
showsPrec :: Int -> EnvironmentPropertyUpdates -> ShowS
$cshowsPrec :: Int -> EnvironmentPropertyUpdates -> ShowS
Prelude.Show, (forall x.
EnvironmentPropertyUpdates -> Rep EnvironmentPropertyUpdates x)
-> (forall x.
Rep EnvironmentPropertyUpdates x -> EnvironmentPropertyUpdates)
-> Generic EnvironmentPropertyUpdates
forall x.
Rep EnvironmentPropertyUpdates x -> EnvironmentPropertyUpdates
forall x.
EnvironmentPropertyUpdates -> Rep EnvironmentPropertyUpdates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnvironmentPropertyUpdates x -> EnvironmentPropertyUpdates
$cfrom :: forall x.
EnvironmentPropertyUpdates -> Rep EnvironmentPropertyUpdates x
Prelude.Generic)
newEnvironmentPropertyUpdates ::
EnvironmentPropertyUpdates
newEnvironmentPropertyUpdates :: EnvironmentPropertyUpdates
newEnvironmentPropertyUpdates =
EnvironmentPropertyUpdates' :: [PropertyGroup] -> EnvironmentPropertyUpdates
EnvironmentPropertyUpdates'
{ $sel:propertyGroups:EnvironmentPropertyUpdates' :: [PropertyGroup]
propertyGroups =
[PropertyGroup]
forall a. Monoid a => a
Prelude.mempty
}
environmentPropertyUpdates_propertyGroups :: Lens.Lens' EnvironmentPropertyUpdates [PropertyGroup]
environmentPropertyUpdates_propertyGroups :: ([PropertyGroup] -> f [PropertyGroup])
-> EnvironmentPropertyUpdates -> f EnvironmentPropertyUpdates
environmentPropertyUpdates_propertyGroups = (EnvironmentPropertyUpdates -> [PropertyGroup])
-> (EnvironmentPropertyUpdates
-> [PropertyGroup] -> EnvironmentPropertyUpdates)
-> Lens
EnvironmentPropertyUpdates
EnvironmentPropertyUpdates
[PropertyGroup]
[PropertyGroup]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnvironmentPropertyUpdates' {[PropertyGroup]
propertyGroups :: [PropertyGroup]
$sel:propertyGroups:EnvironmentPropertyUpdates' :: EnvironmentPropertyUpdates -> [PropertyGroup]
propertyGroups} -> [PropertyGroup]
propertyGroups) (\s :: EnvironmentPropertyUpdates
s@EnvironmentPropertyUpdates' {} [PropertyGroup]
a -> EnvironmentPropertyUpdates
s {$sel:propertyGroups:EnvironmentPropertyUpdates' :: [PropertyGroup]
propertyGroups = [PropertyGroup]
a} :: EnvironmentPropertyUpdates) (([PropertyGroup] -> f [PropertyGroup])
-> EnvironmentPropertyUpdates -> f EnvironmentPropertyUpdates)
-> (([PropertyGroup] -> f [PropertyGroup])
-> [PropertyGroup] -> f [PropertyGroup])
-> ([PropertyGroup] -> f [PropertyGroup])
-> EnvironmentPropertyUpdates
-> f EnvironmentPropertyUpdates
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 EnvironmentPropertyUpdates
instance Prelude.NFData EnvironmentPropertyUpdates
instance Core.ToJSON EnvironmentPropertyUpdates where
toJSON :: EnvironmentPropertyUpdates -> Value
toJSON EnvironmentPropertyUpdates' {[PropertyGroup]
propertyGroups :: [PropertyGroup]
$sel:propertyGroups:EnvironmentPropertyUpdates' :: EnvironmentPropertyUpdates -> [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)
]
)