{-# 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.KinesisStreamsInputDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KinesisStreamsInputDescription = KinesisStreamsInputDescription'
{
KinesisStreamsInputDescription -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
KinesisStreamsInputDescription -> Text
resourceARN :: Prelude.Text
}
deriving (KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool
(KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool)
-> (KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool)
-> Eq KinesisStreamsInputDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool
$c/= :: KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool
== :: KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool
$c== :: KinesisStreamsInputDescription
-> KinesisStreamsInputDescription -> Bool
Prelude.Eq, ReadPrec [KinesisStreamsInputDescription]
ReadPrec KinesisStreamsInputDescription
Int -> ReadS KinesisStreamsInputDescription
ReadS [KinesisStreamsInputDescription]
(Int -> ReadS KinesisStreamsInputDescription)
-> ReadS [KinesisStreamsInputDescription]
-> ReadPrec KinesisStreamsInputDescription
-> ReadPrec [KinesisStreamsInputDescription]
-> Read KinesisStreamsInputDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisStreamsInputDescription]
$creadListPrec :: ReadPrec [KinesisStreamsInputDescription]
readPrec :: ReadPrec KinesisStreamsInputDescription
$creadPrec :: ReadPrec KinesisStreamsInputDescription
readList :: ReadS [KinesisStreamsInputDescription]
$creadList :: ReadS [KinesisStreamsInputDescription]
readsPrec :: Int -> ReadS KinesisStreamsInputDescription
$creadsPrec :: Int -> ReadS KinesisStreamsInputDescription
Prelude.Read, Int -> KinesisStreamsInputDescription -> ShowS
[KinesisStreamsInputDescription] -> ShowS
KinesisStreamsInputDescription -> String
(Int -> KinesisStreamsInputDescription -> ShowS)
-> (KinesisStreamsInputDescription -> String)
-> ([KinesisStreamsInputDescription] -> ShowS)
-> Show KinesisStreamsInputDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisStreamsInputDescription] -> ShowS
$cshowList :: [KinesisStreamsInputDescription] -> ShowS
show :: KinesisStreamsInputDescription -> String
$cshow :: KinesisStreamsInputDescription -> String
showsPrec :: Int -> KinesisStreamsInputDescription -> ShowS
$cshowsPrec :: Int -> KinesisStreamsInputDescription -> ShowS
Prelude.Show, (forall x.
KinesisStreamsInputDescription
-> Rep KinesisStreamsInputDescription x)
-> (forall x.
Rep KinesisStreamsInputDescription x
-> KinesisStreamsInputDescription)
-> Generic KinesisStreamsInputDescription
forall x.
Rep KinesisStreamsInputDescription x
-> KinesisStreamsInputDescription
forall x.
KinesisStreamsInputDescription
-> Rep KinesisStreamsInputDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep KinesisStreamsInputDescription x
-> KinesisStreamsInputDescription
$cfrom :: forall x.
KinesisStreamsInputDescription
-> Rep KinesisStreamsInputDescription x
Prelude.Generic)
newKinesisStreamsInputDescription ::
Prelude.Text ->
KinesisStreamsInputDescription
newKinesisStreamsInputDescription :: Text -> KinesisStreamsInputDescription
newKinesisStreamsInputDescription Text
pResourceARN_ =
KinesisStreamsInputDescription' :: Maybe Text -> Text -> KinesisStreamsInputDescription
KinesisStreamsInputDescription'
{ $sel:roleARN:KinesisStreamsInputDescription' :: Maybe Text
roleARN =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceARN:KinesisStreamsInputDescription' :: Text
resourceARN = Text
pResourceARN_
}
kinesisStreamsInputDescription_roleARN :: Lens.Lens' KinesisStreamsInputDescription (Prelude.Maybe Prelude.Text)
kinesisStreamsInputDescription_roleARN :: (Maybe Text -> f (Maybe Text))
-> KinesisStreamsInputDescription
-> f KinesisStreamsInputDescription
kinesisStreamsInputDescription_roleARN = (KinesisStreamsInputDescription -> Maybe Text)
-> (KinesisStreamsInputDescription
-> Maybe Text -> KinesisStreamsInputDescription)
-> Lens
KinesisStreamsInputDescription
KinesisStreamsInputDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamsInputDescription' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:KinesisStreamsInputDescription' :: KinesisStreamsInputDescription -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: KinesisStreamsInputDescription
s@KinesisStreamsInputDescription' {} Maybe Text
a -> KinesisStreamsInputDescription
s {$sel:roleARN:KinesisStreamsInputDescription' :: Maybe Text
roleARN = Maybe Text
a} :: KinesisStreamsInputDescription)
kinesisStreamsInputDescription_resourceARN :: Lens.Lens' KinesisStreamsInputDescription Prelude.Text
kinesisStreamsInputDescription_resourceARN :: (Text -> f Text)
-> KinesisStreamsInputDescription
-> f KinesisStreamsInputDescription
kinesisStreamsInputDescription_resourceARN = (KinesisStreamsInputDescription -> Text)
-> (KinesisStreamsInputDescription
-> Text -> KinesisStreamsInputDescription)
-> Lens
KinesisStreamsInputDescription
KinesisStreamsInputDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisStreamsInputDescription' {Text
resourceARN :: Text
$sel:resourceARN:KinesisStreamsInputDescription' :: KinesisStreamsInputDescription -> Text
resourceARN} -> Text
resourceARN) (\s :: KinesisStreamsInputDescription
s@KinesisStreamsInputDescription' {} Text
a -> KinesisStreamsInputDescription
s {$sel:resourceARN:KinesisStreamsInputDescription' :: Text
resourceARN = Text
a} :: KinesisStreamsInputDescription)
instance Core.FromJSON KinesisStreamsInputDescription where
parseJSON :: Value -> Parser KinesisStreamsInputDescription
parseJSON =
String
-> (Object -> Parser KinesisStreamsInputDescription)
-> Value
-> Parser KinesisStreamsInputDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"KinesisStreamsInputDescription"
( \Object
x ->
Maybe Text -> Text -> KinesisStreamsInputDescription
KinesisStreamsInputDescription'
(Maybe Text -> Text -> KinesisStreamsInputDescription)
-> Parser (Maybe Text)
-> Parser (Text -> KinesisStreamsInputDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleARN")
Parser (Text -> KinesisStreamsInputDescription)
-> Parser Text -> Parser KinesisStreamsInputDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResourceARN")
)
instance
Prelude.Hashable
KinesisStreamsInputDescription
instance
Prelude.NFData
KinesisStreamsInputDescription