{-# 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.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
resourceARN :: Prelude.Maybe Prelude.Text,
KinesisStreamsInputDescription -> Maybe Text
roleARN :: Prelude.Maybe 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 ::
KinesisStreamsInputDescription
newKinesisStreamsInputDescription :: KinesisStreamsInputDescription
newKinesisStreamsInputDescription =
KinesisStreamsInputDescription' :: Maybe Text -> Maybe Text -> KinesisStreamsInputDescription
KinesisStreamsInputDescription'
{ $sel:resourceARN:KinesisStreamsInputDescription' :: Maybe Text
resourceARN =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:KinesisStreamsInputDescription' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
kinesisStreamsInputDescription_resourceARN :: Lens.Lens' KinesisStreamsInputDescription (Prelude.Maybe Prelude.Text)
kinesisStreamsInputDescription_resourceARN :: (Maybe Text -> f (Maybe Text))
-> KinesisStreamsInputDescription
-> f KinesisStreamsInputDescription
kinesisStreamsInputDescription_resourceARN = (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
resourceARN :: Maybe Text
$sel:resourceARN:KinesisStreamsInputDescription' :: KinesisStreamsInputDescription -> Maybe Text
resourceARN} -> Maybe Text
resourceARN) (\s :: KinesisStreamsInputDescription
s@KinesisStreamsInputDescription' {} Maybe Text
a -> KinesisStreamsInputDescription
s {$sel:resourceARN:KinesisStreamsInputDescription' :: Maybe Text
resourceARN = Maybe Text
a} :: KinesisStreamsInputDescription)
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)
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 -> Maybe Text -> KinesisStreamsInputDescription
KinesisStreamsInputDescription'
(Maybe Text -> Maybe Text -> KinesisStreamsInputDescription)
-> Parser (Maybe Text)
-> Parser (Maybe 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
"ResourceARN")
Parser (Maybe Text -> KinesisStreamsInputDescription)
-> Parser (Maybe Text) -> Parser KinesisStreamsInputDescription
forall (f :: * -> *) a b. Applicative f => 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")
)
instance
Prelude.Hashable
KinesisStreamsInputDescription
instance
Prelude.NFData
KinesisStreamsInputDescription