{-# 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.KinesisAnalytics.Types.ApplicationUpdate where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalytics.Types.CloudWatchLoggingOptionUpdate
import Amazonka.KinesisAnalytics.Types.InputUpdate
import Amazonka.KinesisAnalytics.Types.OutputUpdate
import Amazonka.KinesisAnalytics.Types.ReferenceDataSourceUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationUpdate = ApplicationUpdate'
{
ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates :: Prelude.Maybe [ReferenceDataSourceUpdate],
ApplicationUpdate -> Maybe [InputUpdate]
inputUpdates :: Prelude.Maybe [InputUpdate],
ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates :: Prelude.Maybe [CloudWatchLoggingOptionUpdate],
ApplicationUpdate -> Maybe [OutputUpdate]
outputUpdates :: Prelude.Maybe [OutputUpdate],
ApplicationUpdate -> Maybe Text
applicationCodeUpdate :: Prelude.Maybe Prelude.Text
}
deriving (ApplicationUpdate -> ApplicationUpdate -> Bool
(ApplicationUpdate -> ApplicationUpdate -> Bool)
-> (ApplicationUpdate -> ApplicationUpdate -> Bool)
-> Eq ApplicationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationUpdate -> ApplicationUpdate -> Bool
$c/= :: ApplicationUpdate -> ApplicationUpdate -> Bool
== :: ApplicationUpdate -> ApplicationUpdate -> Bool
$c== :: ApplicationUpdate -> ApplicationUpdate -> Bool
Prelude.Eq, ReadPrec [ApplicationUpdate]
ReadPrec ApplicationUpdate
Int -> ReadS ApplicationUpdate
ReadS [ApplicationUpdate]
(Int -> ReadS ApplicationUpdate)
-> ReadS [ApplicationUpdate]
-> ReadPrec ApplicationUpdate
-> ReadPrec [ApplicationUpdate]
-> Read ApplicationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationUpdate]
$creadListPrec :: ReadPrec [ApplicationUpdate]
readPrec :: ReadPrec ApplicationUpdate
$creadPrec :: ReadPrec ApplicationUpdate
readList :: ReadS [ApplicationUpdate]
$creadList :: ReadS [ApplicationUpdate]
readsPrec :: Int -> ReadS ApplicationUpdate
$creadsPrec :: Int -> ReadS ApplicationUpdate
Prelude.Read, Int -> ApplicationUpdate -> ShowS
[ApplicationUpdate] -> ShowS
ApplicationUpdate -> String
(Int -> ApplicationUpdate -> ShowS)
-> (ApplicationUpdate -> String)
-> ([ApplicationUpdate] -> ShowS)
-> Show ApplicationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationUpdate] -> ShowS
$cshowList :: [ApplicationUpdate] -> ShowS
show :: ApplicationUpdate -> String
$cshow :: ApplicationUpdate -> String
showsPrec :: Int -> ApplicationUpdate -> ShowS
$cshowsPrec :: Int -> ApplicationUpdate -> ShowS
Prelude.Show, (forall x. ApplicationUpdate -> Rep ApplicationUpdate x)
-> (forall x. Rep ApplicationUpdate x -> ApplicationUpdate)
-> Generic ApplicationUpdate
forall x. Rep ApplicationUpdate x -> ApplicationUpdate
forall x. ApplicationUpdate -> Rep ApplicationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationUpdate x -> ApplicationUpdate
$cfrom :: forall x. ApplicationUpdate -> Rep ApplicationUpdate x
Prelude.Generic)
newApplicationUpdate ::
ApplicationUpdate
newApplicationUpdate :: ApplicationUpdate
newApplicationUpdate =
ApplicationUpdate' :: Maybe [ReferenceDataSourceUpdate]
-> Maybe [InputUpdate]
-> Maybe [CloudWatchLoggingOptionUpdate]
-> Maybe [OutputUpdate]
-> Maybe Text
-> ApplicationUpdate
ApplicationUpdate'
{ $sel:referenceDataSourceUpdates:ApplicationUpdate' :: Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates =
Maybe [ReferenceDataSourceUpdate]
forall a. Maybe a
Prelude.Nothing,
$sel:inputUpdates:ApplicationUpdate' :: Maybe [InputUpdate]
inputUpdates = Maybe [InputUpdate]
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates = Maybe [CloudWatchLoggingOptionUpdate]
forall a. Maybe a
Prelude.Nothing,
$sel:outputUpdates:ApplicationUpdate' :: Maybe [OutputUpdate]
outputUpdates = Maybe [OutputUpdate]
forall a. Maybe a
Prelude.Nothing,
$sel:applicationCodeUpdate:ApplicationUpdate' :: Maybe Text
applicationCodeUpdate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
applicationUpdate_referenceDataSourceUpdates :: Lens.Lens' ApplicationUpdate (Prelude.Maybe [ReferenceDataSourceUpdate])
applicationUpdate_referenceDataSourceUpdates :: (Maybe [ReferenceDataSourceUpdate]
-> f (Maybe [ReferenceDataSourceUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate
applicationUpdate_referenceDataSourceUpdates = (ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate])
-> (ApplicationUpdate
-> Maybe [ReferenceDataSourceUpdate] -> ApplicationUpdate)
-> Lens
ApplicationUpdate
ApplicationUpdate
(Maybe [ReferenceDataSourceUpdate])
(Maybe [ReferenceDataSourceUpdate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationUpdate' {Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates :: Maybe [ReferenceDataSourceUpdate]
$sel:referenceDataSourceUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates} -> Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates) (\s :: ApplicationUpdate
s@ApplicationUpdate' {} Maybe [ReferenceDataSourceUpdate]
a -> ApplicationUpdate
s {$sel:referenceDataSourceUpdates:ApplicationUpdate' :: Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates = Maybe [ReferenceDataSourceUpdate]
a} :: ApplicationUpdate) ((Maybe [ReferenceDataSourceUpdate]
-> f (Maybe [ReferenceDataSourceUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate)
-> ((Maybe [ReferenceDataSourceUpdate]
-> f (Maybe [ReferenceDataSourceUpdate]))
-> Maybe [ReferenceDataSourceUpdate]
-> f (Maybe [ReferenceDataSourceUpdate]))
-> (Maybe [ReferenceDataSourceUpdate]
-> f (Maybe [ReferenceDataSourceUpdate]))
-> ApplicationUpdate
-> f ApplicationUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ReferenceDataSourceUpdate]
[ReferenceDataSourceUpdate]
[ReferenceDataSourceUpdate]
[ReferenceDataSourceUpdate]
-> Iso
(Maybe [ReferenceDataSourceUpdate])
(Maybe [ReferenceDataSourceUpdate])
(Maybe [ReferenceDataSourceUpdate])
(Maybe [ReferenceDataSourceUpdate])
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
[ReferenceDataSourceUpdate]
[ReferenceDataSourceUpdate]
[ReferenceDataSourceUpdate]
[ReferenceDataSourceUpdate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationUpdate_inputUpdates :: Lens.Lens' ApplicationUpdate (Prelude.Maybe [InputUpdate])
applicationUpdate_inputUpdates :: (Maybe [InputUpdate] -> f (Maybe [InputUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate
applicationUpdate_inputUpdates = (ApplicationUpdate -> Maybe [InputUpdate])
-> (ApplicationUpdate -> Maybe [InputUpdate] -> ApplicationUpdate)
-> Lens
ApplicationUpdate
ApplicationUpdate
(Maybe [InputUpdate])
(Maybe [InputUpdate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationUpdate' {Maybe [InputUpdate]
inputUpdates :: Maybe [InputUpdate]
$sel:inputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [InputUpdate]
inputUpdates} -> Maybe [InputUpdate]
inputUpdates) (\s :: ApplicationUpdate
s@ApplicationUpdate' {} Maybe [InputUpdate]
a -> ApplicationUpdate
s {$sel:inputUpdates:ApplicationUpdate' :: Maybe [InputUpdate]
inputUpdates = Maybe [InputUpdate]
a} :: ApplicationUpdate) ((Maybe [InputUpdate] -> f (Maybe [InputUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate)
-> ((Maybe [InputUpdate] -> f (Maybe [InputUpdate]))
-> Maybe [InputUpdate] -> f (Maybe [InputUpdate]))
-> (Maybe [InputUpdate] -> f (Maybe [InputUpdate]))
-> ApplicationUpdate
-> f ApplicationUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [InputUpdate] [InputUpdate] [InputUpdate] [InputUpdate]
-> Iso
(Maybe [InputUpdate])
(Maybe [InputUpdate])
(Maybe [InputUpdate])
(Maybe [InputUpdate])
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 [InputUpdate] [InputUpdate] [InputUpdate] [InputUpdate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationUpdate_cloudWatchLoggingOptionUpdates :: Lens.Lens' ApplicationUpdate (Prelude.Maybe [CloudWatchLoggingOptionUpdate])
applicationUpdate_cloudWatchLoggingOptionUpdates :: (Maybe [CloudWatchLoggingOptionUpdate]
-> f (Maybe [CloudWatchLoggingOptionUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate
applicationUpdate_cloudWatchLoggingOptionUpdates = (ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate])
-> (ApplicationUpdate
-> Maybe [CloudWatchLoggingOptionUpdate] -> ApplicationUpdate)
-> Lens
ApplicationUpdate
ApplicationUpdate
(Maybe [CloudWatchLoggingOptionUpdate])
(Maybe [CloudWatchLoggingOptionUpdate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationUpdate' {Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates :: Maybe [CloudWatchLoggingOptionUpdate]
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates} -> Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates) (\s :: ApplicationUpdate
s@ApplicationUpdate' {} Maybe [CloudWatchLoggingOptionUpdate]
a -> ApplicationUpdate
s {$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates = Maybe [CloudWatchLoggingOptionUpdate]
a} :: ApplicationUpdate) ((Maybe [CloudWatchLoggingOptionUpdate]
-> f (Maybe [CloudWatchLoggingOptionUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate)
-> ((Maybe [CloudWatchLoggingOptionUpdate]
-> f (Maybe [CloudWatchLoggingOptionUpdate]))
-> Maybe [CloudWatchLoggingOptionUpdate]
-> f (Maybe [CloudWatchLoggingOptionUpdate]))
-> (Maybe [CloudWatchLoggingOptionUpdate]
-> f (Maybe [CloudWatchLoggingOptionUpdate]))
-> ApplicationUpdate
-> f ApplicationUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CloudWatchLoggingOptionUpdate]
[CloudWatchLoggingOptionUpdate]
[CloudWatchLoggingOptionUpdate]
[CloudWatchLoggingOptionUpdate]
-> Iso
(Maybe [CloudWatchLoggingOptionUpdate])
(Maybe [CloudWatchLoggingOptionUpdate])
(Maybe [CloudWatchLoggingOptionUpdate])
(Maybe [CloudWatchLoggingOptionUpdate])
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
[CloudWatchLoggingOptionUpdate]
[CloudWatchLoggingOptionUpdate]
[CloudWatchLoggingOptionUpdate]
[CloudWatchLoggingOptionUpdate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationUpdate_outputUpdates :: Lens.Lens' ApplicationUpdate (Prelude.Maybe [OutputUpdate])
applicationUpdate_outputUpdates :: (Maybe [OutputUpdate] -> f (Maybe [OutputUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate
applicationUpdate_outputUpdates = (ApplicationUpdate -> Maybe [OutputUpdate])
-> (ApplicationUpdate -> Maybe [OutputUpdate] -> ApplicationUpdate)
-> Lens
ApplicationUpdate
ApplicationUpdate
(Maybe [OutputUpdate])
(Maybe [OutputUpdate])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationUpdate' {Maybe [OutputUpdate]
outputUpdates :: Maybe [OutputUpdate]
$sel:outputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [OutputUpdate]
outputUpdates} -> Maybe [OutputUpdate]
outputUpdates) (\s :: ApplicationUpdate
s@ApplicationUpdate' {} Maybe [OutputUpdate]
a -> ApplicationUpdate
s {$sel:outputUpdates:ApplicationUpdate' :: Maybe [OutputUpdate]
outputUpdates = Maybe [OutputUpdate]
a} :: ApplicationUpdate) ((Maybe [OutputUpdate] -> f (Maybe [OutputUpdate]))
-> ApplicationUpdate -> f ApplicationUpdate)
-> ((Maybe [OutputUpdate] -> f (Maybe [OutputUpdate]))
-> Maybe [OutputUpdate] -> f (Maybe [OutputUpdate]))
-> (Maybe [OutputUpdate] -> f (Maybe [OutputUpdate]))
-> ApplicationUpdate
-> f ApplicationUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [OutputUpdate] [OutputUpdate] [OutputUpdate] [OutputUpdate]
-> Iso
(Maybe [OutputUpdate])
(Maybe [OutputUpdate])
(Maybe [OutputUpdate])
(Maybe [OutputUpdate])
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 [OutputUpdate] [OutputUpdate] [OutputUpdate] [OutputUpdate]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationUpdate_applicationCodeUpdate :: Lens.Lens' ApplicationUpdate (Prelude.Maybe Prelude.Text)
applicationUpdate_applicationCodeUpdate :: (Maybe Text -> f (Maybe Text))
-> ApplicationUpdate -> f ApplicationUpdate
applicationUpdate_applicationCodeUpdate = (ApplicationUpdate -> Maybe Text)
-> (ApplicationUpdate -> Maybe Text -> ApplicationUpdate)
-> Lens
ApplicationUpdate ApplicationUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationUpdate' {Maybe Text
applicationCodeUpdate :: Maybe Text
$sel:applicationCodeUpdate:ApplicationUpdate' :: ApplicationUpdate -> Maybe Text
applicationCodeUpdate} -> Maybe Text
applicationCodeUpdate) (\s :: ApplicationUpdate
s@ApplicationUpdate' {} Maybe Text
a -> ApplicationUpdate
s {$sel:applicationCodeUpdate:ApplicationUpdate' :: Maybe Text
applicationCodeUpdate = Maybe Text
a} :: ApplicationUpdate)
instance Prelude.Hashable ApplicationUpdate
instance Prelude.NFData ApplicationUpdate
instance Core.ToJSON ApplicationUpdate where
toJSON :: ApplicationUpdate -> Value
toJSON ApplicationUpdate' {Maybe [CloudWatchLoggingOptionUpdate]
Maybe [InputUpdate]
Maybe [OutputUpdate]
Maybe [ReferenceDataSourceUpdate]
Maybe Text
applicationCodeUpdate :: Maybe Text
outputUpdates :: Maybe [OutputUpdate]
cloudWatchLoggingOptionUpdates :: Maybe [CloudWatchLoggingOptionUpdate]
inputUpdates :: Maybe [InputUpdate]
referenceDataSourceUpdates :: Maybe [ReferenceDataSourceUpdate]
$sel:applicationCodeUpdate:ApplicationUpdate' :: ApplicationUpdate -> Maybe Text
$sel:outputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [OutputUpdate]
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
$sel:inputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [InputUpdate]
$sel:referenceDataSourceUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ReferenceDataSourceUpdates" Text -> [ReferenceDataSourceUpdate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ReferenceDataSourceUpdate] -> Pair)
-> Maybe [ReferenceDataSourceUpdate] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates,
(Text
"InputUpdates" Text -> [InputUpdate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([InputUpdate] -> Pair) -> Maybe [InputUpdate] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputUpdate]
inputUpdates,
(Text
"CloudWatchLoggingOptionUpdates" Text -> [CloudWatchLoggingOptionUpdate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([CloudWatchLoggingOptionUpdate] -> Pair)
-> Maybe [CloudWatchLoggingOptionUpdate] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates,
(Text
"OutputUpdates" Text -> [OutputUpdate] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([OutputUpdate] -> Pair) -> Maybe [OutputUpdate] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OutputUpdate]
outputUpdates,
(Text
"ApplicationCodeUpdate" 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
applicationCodeUpdate
]
)