{-# 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.Firehose.Types.SourceDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Firehose.Types.KinesisStreamSourceDescription
import qualified Amazonka.Prelude as Prelude
data SourceDescription = SourceDescription'
{
SourceDescription -> Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription :: Prelude.Maybe KinesisStreamSourceDescription
}
deriving (SourceDescription -> SourceDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceDescription -> SourceDescription -> Bool
$c/= :: SourceDescription -> SourceDescription -> Bool
== :: SourceDescription -> SourceDescription -> Bool
$c== :: SourceDescription -> SourceDescription -> Bool
Prelude.Eq, ReadPrec [SourceDescription]
ReadPrec SourceDescription
Int -> ReadS SourceDescription
ReadS [SourceDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceDescription]
$creadListPrec :: ReadPrec [SourceDescription]
readPrec :: ReadPrec SourceDescription
$creadPrec :: ReadPrec SourceDescription
readList :: ReadS [SourceDescription]
$creadList :: ReadS [SourceDescription]
readsPrec :: Int -> ReadS SourceDescription
$creadsPrec :: Int -> ReadS SourceDescription
Prelude.Read, Int -> SourceDescription -> ShowS
[SourceDescription] -> ShowS
SourceDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceDescription] -> ShowS
$cshowList :: [SourceDescription] -> ShowS
show :: SourceDescription -> String
$cshow :: SourceDescription -> String
showsPrec :: Int -> SourceDescription -> ShowS
$cshowsPrec :: Int -> SourceDescription -> ShowS
Prelude.Show, forall x. Rep SourceDescription x -> SourceDescription
forall x. SourceDescription -> Rep SourceDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SourceDescription x -> SourceDescription
$cfrom :: forall x. SourceDescription -> Rep SourceDescription x
Prelude.Generic)
newSourceDescription ::
SourceDescription
newSourceDescription :: SourceDescription
newSourceDescription =
SourceDescription'
{ $sel:kinesisStreamSourceDescription:SourceDescription' :: Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription =
forall a. Maybe a
Prelude.Nothing
}
sourceDescription_kinesisStreamSourceDescription :: Lens.Lens' SourceDescription (Prelude.Maybe KinesisStreamSourceDescription)
sourceDescription_kinesisStreamSourceDescription :: Lens' SourceDescription (Maybe KinesisStreamSourceDescription)
sourceDescription_kinesisStreamSourceDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceDescription' {Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription :: Maybe KinesisStreamSourceDescription
$sel:kinesisStreamSourceDescription:SourceDescription' :: SourceDescription -> Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription} -> Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription) (\s :: SourceDescription
s@SourceDescription' {} Maybe KinesisStreamSourceDescription
a -> SourceDescription
s {$sel:kinesisStreamSourceDescription:SourceDescription' :: Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription = Maybe KinesisStreamSourceDescription
a} :: SourceDescription)
instance Data.FromJSON SourceDescription where
parseJSON :: Value -> Parser SourceDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SourceDescription"
( \Object
x ->
Maybe KinesisStreamSourceDescription -> SourceDescription
SourceDescription'
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
"KinesisStreamSourceDescription")
)
instance Prelude.Hashable SourceDescription where
hashWithSalt :: Int -> SourceDescription -> Int
hashWithSalt Int
_salt SourceDescription' {Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription :: Maybe KinesisStreamSourceDescription
$sel:kinesisStreamSourceDescription:SourceDescription' :: SourceDescription -> Maybe KinesisStreamSourceDescription
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription
instance Prelude.NFData SourceDescription where
rnf :: SourceDescription -> ()
rnf SourceDescription' {Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription :: Maybe KinesisStreamSourceDescription
$sel:kinesisStreamSourceDescription:SourceDescription' :: SourceDescription -> Maybe KinesisStreamSourceDescription
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe KinesisStreamSourceDescription
kinesisStreamSourceDescription