{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisAnalytics.Types.CloudWatchLoggingOptionUpdate
import Amazonka.KinesisAnalytics.Types.InputUpdate
import Amazonka.KinesisAnalytics.Types.OutputUpdate
import Amazonka.KinesisAnalytics.Types.ReferenceDataSourceUpdate
import qualified Amazonka.Prelude as Prelude
data ApplicationUpdate = ApplicationUpdate'
{
ApplicationUpdate -> Maybe Text
applicationCodeUpdate :: Prelude.Maybe Prelude.Text,
ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates :: Prelude.Maybe [CloudWatchLoggingOptionUpdate],
ApplicationUpdate -> Maybe [InputUpdate]
inputUpdates :: Prelude.Maybe [InputUpdate],
ApplicationUpdate -> Maybe [OutputUpdate]
outputUpdates :: Prelude.Maybe [OutputUpdate],
ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates :: Prelude.Maybe [ReferenceDataSourceUpdate]
}
deriving (ApplicationUpdate -> ApplicationUpdate -> Bool
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]
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
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. 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'
{ $sel:applicationCodeUpdate:ApplicationUpdate' :: Maybe Text
applicationCodeUpdate =
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates = forall a. Maybe a
Prelude.Nothing,
$sel:inputUpdates:ApplicationUpdate' :: Maybe [InputUpdate]
inputUpdates = forall a. Maybe a
Prelude.Nothing,
$sel:outputUpdates:ApplicationUpdate' :: Maybe [OutputUpdate]
outputUpdates = forall a. Maybe a
Prelude.Nothing,
$sel:referenceDataSourceUpdates:ApplicationUpdate' :: Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates = forall a. Maybe a
Prelude.Nothing
}
applicationUpdate_applicationCodeUpdate :: Lens.Lens' ApplicationUpdate (Prelude.Maybe Prelude.Text)
applicationUpdate_applicationCodeUpdate :: Lens' ApplicationUpdate (Maybe Text)
applicationUpdate_applicationCodeUpdate = 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)
applicationUpdate_cloudWatchLoggingOptionUpdates :: Lens.Lens' ApplicationUpdate (Prelude.Maybe [CloudWatchLoggingOptionUpdate])
applicationUpdate_cloudWatchLoggingOptionUpdates :: Lens' ApplicationUpdate (Maybe [CloudWatchLoggingOptionUpdate])
applicationUpdate_cloudWatchLoggingOptionUpdates = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' ApplicationUpdate (Maybe [InputUpdate])
applicationUpdate_inputUpdates = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' ApplicationUpdate (Maybe [OutputUpdate])
applicationUpdate_outputUpdates = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationUpdate_referenceDataSourceUpdates :: Lens.Lens' ApplicationUpdate (Prelude.Maybe [ReferenceDataSourceUpdate])
applicationUpdate_referenceDataSourceUpdates :: Lens' ApplicationUpdate (Maybe [ReferenceDataSourceUpdate])
applicationUpdate_referenceDataSourceUpdates = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable ApplicationUpdate where
hashWithSalt :: Int -> ApplicationUpdate -> Int
hashWithSalt Int
_salt ApplicationUpdate' {Maybe [CloudWatchLoggingOptionUpdate]
Maybe [InputUpdate]
Maybe [OutputUpdate]
Maybe [ReferenceDataSourceUpdate]
Maybe Text
referenceDataSourceUpdates :: Maybe [ReferenceDataSourceUpdate]
outputUpdates :: Maybe [OutputUpdate]
inputUpdates :: Maybe [InputUpdate]
cloudWatchLoggingOptionUpdates :: Maybe [CloudWatchLoggingOptionUpdate]
applicationCodeUpdate :: Maybe Text
$sel:referenceDataSourceUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
$sel:outputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [OutputUpdate]
$sel:inputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [InputUpdate]
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
$sel:applicationCodeUpdate:ApplicationUpdate' :: ApplicationUpdate -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applicationCodeUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InputUpdate]
inputUpdates
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [OutputUpdate]
outputUpdates
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates
instance Prelude.NFData ApplicationUpdate where
rnf :: ApplicationUpdate -> ()
rnf ApplicationUpdate' {Maybe [CloudWatchLoggingOptionUpdate]
Maybe [InputUpdate]
Maybe [OutputUpdate]
Maybe [ReferenceDataSourceUpdate]
Maybe Text
referenceDataSourceUpdates :: Maybe [ReferenceDataSourceUpdate]
outputUpdates :: Maybe [OutputUpdate]
inputUpdates :: Maybe [InputUpdate]
cloudWatchLoggingOptionUpdates :: Maybe [CloudWatchLoggingOptionUpdate]
applicationCodeUpdate :: Maybe Text
$sel:referenceDataSourceUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
$sel:outputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [OutputUpdate]
$sel:inputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [InputUpdate]
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
$sel:applicationCodeUpdate:ApplicationUpdate' :: ApplicationUpdate -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationCodeUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InputUpdate]
inputUpdates
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [OutputUpdate]
outputUpdates
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates
instance Data.ToJSON ApplicationUpdate where
toJSON :: ApplicationUpdate -> Value
toJSON ApplicationUpdate' {Maybe [CloudWatchLoggingOptionUpdate]
Maybe [InputUpdate]
Maybe [OutputUpdate]
Maybe [ReferenceDataSourceUpdate]
Maybe Text
referenceDataSourceUpdates :: Maybe [ReferenceDataSourceUpdate]
outputUpdates :: Maybe [OutputUpdate]
inputUpdates :: Maybe [InputUpdate]
cloudWatchLoggingOptionUpdates :: Maybe [CloudWatchLoggingOptionUpdate]
applicationCodeUpdate :: Maybe Text
$sel:referenceDataSourceUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [ReferenceDataSourceUpdate]
$sel:outputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [OutputUpdate]
$sel:inputUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [InputUpdate]
$sel:cloudWatchLoggingOptionUpdates:ApplicationUpdate' :: ApplicationUpdate -> Maybe [CloudWatchLoggingOptionUpdate]
$sel:applicationCodeUpdate:ApplicationUpdate' :: ApplicationUpdate -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ApplicationCodeUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
applicationCodeUpdate,
(Key
"CloudWatchLoggingOptionUpdates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CloudWatchLoggingOptionUpdate]
cloudWatchLoggingOptionUpdates,
(Key
"InputUpdates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InputUpdate]
inputUpdates,
(Key
"OutputUpdates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OutputUpdate]
outputUpdates,
(Key
"ReferenceDataSourceUpdates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReferenceDataSourceUpdate]
referenceDataSourceUpdates
]
)