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