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