{-# 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.ApplicationCodeConfigurationDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisAnalyticsV2.Types.CodeContentDescription
import Amazonka.KinesisAnalyticsV2.Types.CodeContentType
import qualified Amazonka.Prelude as Prelude
data ApplicationCodeConfigurationDescription = ApplicationCodeConfigurationDescription'
{
ApplicationCodeConfigurationDescription
-> Maybe CodeContentDescription
codeContentDescription :: Prelude.Maybe CodeContentDescription,
ApplicationCodeConfigurationDescription -> CodeContentType
codeContentType :: CodeContentType
}
deriving (ApplicationCodeConfigurationDescription
-> ApplicationCodeConfigurationDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationCodeConfigurationDescription
-> ApplicationCodeConfigurationDescription -> Bool
$c/= :: ApplicationCodeConfigurationDescription
-> ApplicationCodeConfigurationDescription -> Bool
== :: ApplicationCodeConfigurationDescription
-> ApplicationCodeConfigurationDescription -> Bool
$c== :: ApplicationCodeConfigurationDescription
-> ApplicationCodeConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [ApplicationCodeConfigurationDescription]
ReadPrec ApplicationCodeConfigurationDescription
Int -> ReadS ApplicationCodeConfigurationDescription
ReadS [ApplicationCodeConfigurationDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationCodeConfigurationDescription]
$creadListPrec :: ReadPrec [ApplicationCodeConfigurationDescription]
readPrec :: ReadPrec ApplicationCodeConfigurationDescription
$creadPrec :: ReadPrec ApplicationCodeConfigurationDescription
readList :: ReadS [ApplicationCodeConfigurationDescription]
$creadList :: ReadS [ApplicationCodeConfigurationDescription]
readsPrec :: Int -> ReadS ApplicationCodeConfigurationDescription
$creadsPrec :: Int -> ReadS ApplicationCodeConfigurationDescription
Prelude.Read, Int -> ApplicationCodeConfigurationDescription -> ShowS
[ApplicationCodeConfigurationDescription] -> ShowS
ApplicationCodeConfigurationDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationCodeConfigurationDescription] -> ShowS
$cshowList :: [ApplicationCodeConfigurationDescription] -> ShowS
show :: ApplicationCodeConfigurationDescription -> String
$cshow :: ApplicationCodeConfigurationDescription -> String
showsPrec :: Int -> ApplicationCodeConfigurationDescription -> ShowS
$cshowsPrec :: Int -> ApplicationCodeConfigurationDescription -> ShowS
Prelude.Show, forall x.
Rep ApplicationCodeConfigurationDescription x
-> ApplicationCodeConfigurationDescription
forall x.
ApplicationCodeConfigurationDescription
-> Rep ApplicationCodeConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationCodeConfigurationDescription x
-> ApplicationCodeConfigurationDescription
$cfrom :: forall x.
ApplicationCodeConfigurationDescription
-> Rep ApplicationCodeConfigurationDescription x
Prelude.Generic)
newApplicationCodeConfigurationDescription ::
CodeContentType ->
ApplicationCodeConfigurationDescription
newApplicationCodeConfigurationDescription :: CodeContentType -> ApplicationCodeConfigurationDescription
newApplicationCodeConfigurationDescription
CodeContentType
pCodeContentType_ =
ApplicationCodeConfigurationDescription'
{ $sel:codeContentDescription:ApplicationCodeConfigurationDescription' :: Maybe CodeContentDescription
codeContentDescription =
forall a. Maybe a
Prelude.Nothing,
$sel:codeContentType:ApplicationCodeConfigurationDescription' :: CodeContentType
codeContentType =
CodeContentType
pCodeContentType_
}
applicationCodeConfigurationDescription_codeContentDescription :: Lens.Lens' ApplicationCodeConfigurationDescription (Prelude.Maybe CodeContentDescription)
applicationCodeConfigurationDescription_codeContentDescription :: Lens'
ApplicationCodeConfigurationDescription
(Maybe CodeContentDescription)
applicationCodeConfigurationDescription_codeContentDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationCodeConfigurationDescription' {Maybe CodeContentDescription
codeContentDescription :: Maybe CodeContentDescription
$sel:codeContentDescription:ApplicationCodeConfigurationDescription' :: ApplicationCodeConfigurationDescription
-> Maybe CodeContentDescription
codeContentDescription} -> Maybe CodeContentDescription
codeContentDescription) (\s :: ApplicationCodeConfigurationDescription
s@ApplicationCodeConfigurationDescription' {} Maybe CodeContentDescription
a -> ApplicationCodeConfigurationDescription
s {$sel:codeContentDescription:ApplicationCodeConfigurationDescription' :: Maybe CodeContentDescription
codeContentDescription = Maybe CodeContentDescription
a} :: ApplicationCodeConfigurationDescription)
applicationCodeConfigurationDescription_codeContentType :: Lens.Lens' ApplicationCodeConfigurationDescription CodeContentType
applicationCodeConfigurationDescription_codeContentType :: Lens' ApplicationCodeConfigurationDescription CodeContentType
applicationCodeConfigurationDescription_codeContentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationCodeConfigurationDescription' {CodeContentType
codeContentType :: CodeContentType
$sel:codeContentType:ApplicationCodeConfigurationDescription' :: ApplicationCodeConfigurationDescription -> CodeContentType
codeContentType} -> CodeContentType
codeContentType) (\s :: ApplicationCodeConfigurationDescription
s@ApplicationCodeConfigurationDescription' {} CodeContentType
a -> ApplicationCodeConfigurationDescription
s {$sel:codeContentType:ApplicationCodeConfigurationDescription' :: CodeContentType
codeContentType = CodeContentType
a} :: ApplicationCodeConfigurationDescription)
instance
Data.FromJSON
ApplicationCodeConfigurationDescription
where
parseJSON :: Value -> Parser ApplicationCodeConfigurationDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ApplicationCodeConfigurationDescription"
( \Object
x ->
Maybe CodeContentDescription
-> CodeContentType -> ApplicationCodeConfigurationDescription
ApplicationCodeConfigurationDescription'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CodeContentDescription")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"CodeContentType")
)
instance
Prelude.Hashable
ApplicationCodeConfigurationDescription
where
hashWithSalt :: Int -> ApplicationCodeConfigurationDescription -> Int
hashWithSalt
Int
_salt
ApplicationCodeConfigurationDescription' {Maybe CodeContentDescription
CodeContentType
codeContentType :: CodeContentType
codeContentDescription :: Maybe CodeContentDescription
$sel:codeContentType:ApplicationCodeConfigurationDescription' :: ApplicationCodeConfigurationDescription -> CodeContentType
$sel:codeContentDescription:ApplicationCodeConfigurationDescription' :: ApplicationCodeConfigurationDescription
-> Maybe CodeContentDescription
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CodeContentDescription
codeContentDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` CodeContentType
codeContentType
instance
Prelude.NFData
ApplicationCodeConfigurationDescription
where
rnf :: ApplicationCodeConfigurationDescription -> ()
rnf ApplicationCodeConfigurationDescription' {Maybe CodeContentDescription
CodeContentType
codeContentType :: CodeContentType
codeContentDescription :: Maybe CodeContentDescription
$sel:codeContentType:ApplicationCodeConfigurationDescription' :: ApplicationCodeConfigurationDescription -> CodeContentType
$sel:codeContentDescription:ApplicationCodeConfigurationDescription' :: ApplicationCodeConfigurationDescription
-> Maybe CodeContentDescription
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CodeContentDescription
codeContentDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf CodeContentType
codeContentType