{-# 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.ApplicationCodeConfigurationUpdate where
import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.CodeContentType
import Amazonka.KinesisAnalyticsV2.Types.CodeContentUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationCodeConfigurationUpdate = ApplicationCodeConfigurationUpdate'
{
ApplicationCodeConfigurationUpdate -> Maybe CodeContentType
codeContentTypeUpdate :: Prelude.Maybe CodeContentType,
ApplicationCodeConfigurationUpdate -> Maybe CodeContentUpdate
codeContentUpdate :: Prelude.Maybe CodeContentUpdate
}
deriving (ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool
(ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool)
-> (ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool)
-> Eq ApplicationCodeConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool
$c/= :: ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool
== :: ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool
$c== :: ApplicationCodeConfigurationUpdate
-> ApplicationCodeConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [ApplicationCodeConfigurationUpdate]
ReadPrec ApplicationCodeConfigurationUpdate
Int -> ReadS ApplicationCodeConfigurationUpdate
ReadS [ApplicationCodeConfigurationUpdate]
(Int -> ReadS ApplicationCodeConfigurationUpdate)
-> ReadS [ApplicationCodeConfigurationUpdate]
-> ReadPrec ApplicationCodeConfigurationUpdate
-> ReadPrec [ApplicationCodeConfigurationUpdate]
-> Read ApplicationCodeConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationCodeConfigurationUpdate]
$creadListPrec :: ReadPrec [ApplicationCodeConfigurationUpdate]
readPrec :: ReadPrec ApplicationCodeConfigurationUpdate
$creadPrec :: ReadPrec ApplicationCodeConfigurationUpdate
readList :: ReadS [ApplicationCodeConfigurationUpdate]
$creadList :: ReadS [ApplicationCodeConfigurationUpdate]
readsPrec :: Int -> ReadS ApplicationCodeConfigurationUpdate
$creadsPrec :: Int -> ReadS ApplicationCodeConfigurationUpdate
Prelude.Read, Int -> ApplicationCodeConfigurationUpdate -> ShowS
[ApplicationCodeConfigurationUpdate] -> ShowS
ApplicationCodeConfigurationUpdate -> String
(Int -> ApplicationCodeConfigurationUpdate -> ShowS)
-> (ApplicationCodeConfigurationUpdate -> String)
-> ([ApplicationCodeConfigurationUpdate] -> ShowS)
-> Show ApplicationCodeConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationCodeConfigurationUpdate] -> ShowS
$cshowList :: [ApplicationCodeConfigurationUpdate] -> ShowS
show :: ApplicationCodeConfigurationUpdate -> String
$cshow :: ApplicationCodeConfigurationUpdate -> String
showsPrec :: Int -> ApplicationCodeConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> ApplicationCodeConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
ApplicationCodeConfigurationUpdate
-> Rep ApplicationCodeConfigurationUpdate x)
-> (forall x.
Rep ApplicationCodeConfigurationUpdate x
-> ApplicationCodeConfigurationUpdate)
-> Generic ApplicationCodeConfigurationUpdate
forall x.
Rep ApplicationCodeConfigurationUpdate x
-> ApplicationCodeConfigurationUpdate
forall x.
ApplicationCodeConfigurationUpdate
-> Rep ApplicationCodeConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationCodeConfigurationUpdate x
-> ApplicationCodeConfigurationUpdate
$cfrom :: forall x.
ApplicationCodeConfigurationUpdate
-> Rep ApplicationCodeConfigurationUpdate x
Prelude.Generic)
newApplicationCodeConfigurationUpdate ::
ApplicationCodeConfigurationUpdate
newApplicationCodeConfigurationUpdate :: ApplicationCodeConfigurationUpdate
newApplicationCodeConfigurationUpdate =
ApplicationCodeConfigurationUpdate' :: Maybe CodeContentType
-> Maybe CodeContentUpdate -> ApplicationCodeConfigurationUpdate
ApplicationCodeConfigurationUpdate'
{ $sel:codeContentTypeUpdate:ApplicationCodeConfigurationUpdate' :: Maybe CodeContentType
codeContentTypeUpdate =
Maybe CodeContentType
forall a. Maybe a
Prelude.Nothing,
$sel:codeContentUpdate:ApplicationCodeConfigurationUpdate' :: Maybe CodeContentUpdate
codeContentUpdate = Maybe CodeContentUpdate
forall a. Maybe a
Prelude.Nothing
}
applicationCodeConfigurationUpdate_codeContentTypeUpdate :: Lens.Lens' ApplicationCodeConfigurationUpdate (Prelude.Maybe CodeContentType)
applicationCodeConfigurationUpdate_codeContentTypeUpdate :: (Maybe CodeContentType -> f (Maybe CodeContentType))
-> ApplicationCodeConfigurationUpdate
-> f ApplicationCodeConfigurationUpdate
applicationCodeConfigurationUpdate_codeContentTypeUpdate = (ApplicationCodeConfigurationUpdate -> Maybe CodeContentType)
-> (ApplicationCodeConfigurationUpdate
-> Maybe CodeContentType -> ApplicationCodeConfigurationUpdate)
-> Lens
ApplicationCodeConfigurationUpdate
ApplicationCodeConfigurationUpdate
(Maybe CodeContentType)
(Maybe CodeContentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationCodeConfigurationUpdate' {Maybe CodeContentType
codeContentTypeUpdate :: Maybe CodeContentType
$sel:codeContentTypeUpdate:ApplicationCodeConfigurationUpdate' :: ApplicationCodeConfigurationUpdate -> Maybe CodeContentType
codeContentTypeUpdate} -> Maybe CodeContentType
codeContentTypeUpdate) (\s :: ApplicationCodeConfigurationUpdate
s@ApplicationCodeConfigurationUpdate' {} Maybe CodeContentType
a -> ApplicationCodeConfigurationUpdate
s {$sel:codeContentTypeUpdate:ApplicationCodeConfigurationUpdate' :: Maybe CodeContentType
codeContentTypeUpdate = Maybe CodeContentType
a} :: ApplicationCodeConfigurationUpdate)
applicationCodeConfigurationUpdate_codeContentUpdate :: Lens.Lens' ApplicationCodeConfigurationUpdate (Prelude.Maybe CodeContentUpdate)
applicationCodeConfigurationUpdate_codeContentUpdate :: (Maybe CodeContentUpdate -> f (Maybe CodeContentUpdate))
-> ApplicationCodeConfigurationUpdate
-> f ApplicationCodeConfigurationUpdate
applicationCodeConfigurationUpdate_codeContentUpdate = (ApplicationCodeConfigurationUpdate -> Maybe CodeContentUpdate)
-> (ApplicationCodeConfigurationUpdate
-> Maybe CodeContentUpdate -> ApplicationCodeConfigurationUpdate)
-> Lens
ApplicationCodeConfigurationUpdate
ApplicationCodeConfigurationUpdate
(Maybe CodeContentUpdate)
(Maybe CodeContentUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationCodeConfigurationUpdate' {Maybe CodeContentUpdate
codeContentUpdate :: Maybe CodeContentUpdate
$sel:codeContentUpdate:ApplicationCodeConfigurationUpdate' :: ApplicationCodeConfigurationUpdate -> Maybe CodeContentUpdate
codeContentUpdate} -> Maybe CodeContentUpdate
codeContentUpdate) (\s :: ApplicationCodeConfigurationUpdate
s@ApplicationCodeConfigurationUpdate' {} Maybe CodeContentUpdate
a -> ApplicationCodeConfigurationUpdate
s {$sel:codeContentUpdate:ApplicationCodeConfigurationUpdate' :: Maybe CodeContentUpdate
codeContentUpdate = Maybe CodeContentUpdate
a} :: ApplicationCodeConfigurationUpdate)
instance
Prelude.Hashable
ApplicationCodeConfigurationUpdate
instance
Prelude.NFData
ApplicationCodeConfigurationUpdate
instance
Core.ToJSON
ApplicationCodeConfigurationUpdate
where
toJSON :: ApplicationCodeConfigurationUpdate -> Value
toJSON ApplicationCodeConfigurationUpdate' {Maybe CodeContentType
Maybe CodeContentUpdate
codeContentUpdate :: Maybe CodeContentUpdate
codeContentTypeUpdate :: Maybe CodeContentType
$sel:codeContentUpdate:ApplicationCodeConfigurationUpdate' :: ApplicationCodeConfigurationUpdate -> Maybe CodeContentUpdate
$sel:codeContentTypeUpdate:ApplicationCodeConfigurationUpdate' :: ApplicationCodeConfigurationUpdate -> Maybe CodeContentType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CodeContentTypeUpdate" Text -> CodeContentType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CodeContentType -> Pair) -> Maybe CodeContentType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeContentType
codeContentTypeUpdate,
(Text
"CodeContentUpdate" Text -> CodeContentUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CodeContentUpdate -> Pair)
-> Maybe CodeContentUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeContentUpdate
codeContentUpdate
]
)