{-# 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.CustomerProfiles.Types.ExportingConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types.S3ExportingConfig
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ExportingConfig = ExportingConfig'
{
ExportingConfig -> Maybe S3ExportingConfig
s3Exporting :: Prelude.Maybe S3ExportingConfig
}
deriving (ExportingConfig -> ExportingConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportingConfig -> ExportingConfig -> Bool
$c/= :: ExportingConfig -> ExportingConfig -> Bool
== :: ExportingConfig -> ExportingConfig -> Bool
$c== :: ExportingConfig -> ExportingConfig -> Bool
Prelude.Eq, ReadPrec [ExportingConfig]
ReadPrec ExportingConfig
Int -> ReadS ExportingConfig
ReadS [ExportingConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportingConfig]
$creadListPrec :: ReadPrec [ExportingConfig]
readPrec :: ReadPrec ExportingConfig
$creadPrec :: ReadPrec ExportingConfig
readList :: ReadS [ExportingConfig]
$creadList :: ReadS [ExportingConfig]
readsPrec :: Int -> ReadS ExportingConfig
$creadsPrec :: Int -> ReadS ExportingConfig
Prelude.Read, Int -> ExportingConfig -> ShowS
[ExportingConfig] -> ShowS
ExportingConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportingConfig] -> ShowS
$cshowList :: [ExportingConfig] -> ShowS
show :: ExportingConfig -> String
$cshow :: ExportingConfig -> String
showsPrec :: Int -> ExportingConfig -> ShowS
$cshowsPrec :: Int -> ExportingConfig -> ShowS
Prelude.Show, forall x. Rep ExportingConfig x -> ExportingConfig
forall x. ExportingConfig -> Rep ExportingConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportingConfig x -> ExportingConfig
$cfrom :: forall x. ExportingConfig -> Rep ExportingConfig x
Prelude.Generic)
newExportingConfig ::
ExportingConfig
newExportingConfig :: ExportingConfig
newExportingConfig =
ExportingConfig' {$sel:s3Exporting:ExportingConfig' :: Maybe S3ExportingConfig
s3Exporting = forall a. Maybe a
Prelude.Nothing}
exportingConfig_s3Exporting :: Lens.Lens' ExportingConfig (Prelude.Maybe S3ExportingConfig)
exportingConfig_s3Exporting :: Lens' ExportingConfig (Maybe S3ExportingConfig)
exportingConfig_s3Exporting = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportingConfig' {Maybe S3ExportingConfig
s3Exporting :: Maybe S3ExportingConfig
$sel:s3Exporting:ExportingConfig' :: ExportingConfig -> Maybe S3ExportingConfig
s3Exporting} -> Maybe S3ExportingConfig
s3Exporting) (\s :: ExportingConfig
s@ExportingConfig' {} Maybe S3ExportingConfig
a -> ExportingConfig
s {$sel:s3Exporting:ExportingConfig' :: Maybe S3ExportingConfig
s3Exporting = Maybe S3ExportingConfig
a} :: ExportingConfig)
instance Data.FromJSON ExportingConfig where
parseJSON :: Value -> Parser ExportingConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExportingConfig"
( \Object
x ->
Maybe S3ExportingConfig -> ExportingConfig
ExportingConfig'
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
"S3Exporting")
)
instance Prelude.Hashable ExportingConfig where
hashWithSalt :: Int -> ExportingConfig -> Int
hashWithSalt Int
_salt ExportingConfig' {Maybe S3ExportingConfig
s3Exporting :: Maybe S3ExportingConfig
$sel:s3Exporting:ExportingConfig' :: ExportingConfig -> Maybe S3ExportingConfig
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3ExportingConfig
s3Exporting
instance Prelude.NFData ExportingConfig where
rnf :: ExportingConfig -> ()
rnf ExportingConfig' {Maybe S3ExportingConfig
s3Exporting :: Maybe S3ExportingConfig
$sel:s3Exporting:ExportingConfig' :: ExportingConfig -> Maybe S3ExportingConfig
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe S3ExportingConfig
s3Exporting
instance Data.ToJSON ExportingConfig where
toJSON :: ExportingConfig -> Value
toJSON ExportingConfig' {Maybe S3ExportingConfig
s3Exporting :: Maybe S3ExportingConfig
$sel:s3Exporting:ExportingConfig' :: ExportingConfig -> Maybe S3ExportingConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"S3Exporting" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3ExportingConfig
s3Exporting]
)