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