{-# 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.S3ExportingLocation 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
data S3ExportingLocation = S3ExportingLocation'
{
S3ExportingLocation -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
S3ExportingLocation -> Maybe Text
s3KeyName :: Prelude.Maybe Prelude.Text
}
deriving (S3ExportingLocation -> S3ExportingLocation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3ExportingLocation -> S3ExportingLocation -> Bool
$c/= :: S3ExportingLocation -> S3ExportingLocation -> Bool
== :: S3ExportingLocation -> S3ExportingLocation -> Bool
$c== :: S3ExportingLocation -> S3ExportingLocation -> Bool
Prelude.Eq, ReadPrec [S3ExportingLocation]
ReadPrec S3ExportingLocation
Int -> ReadS S3ExportingLocation
ReadS [S3ExportingLocation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3ExportingLocation]
$creadListPrec :: ReadPrec [S3ExportingLocation]
readPrec :: ReadPrec S3ExportingLocation
$creadPrec :: ReadPrec S3ExportingLocation
readList :: ReadS [S3ExportingLocation]
$creadList :: ReadS [S3ExportingLocation]
readsPrec :: Int -> ReadS S3ExportingLocation
$creadsPrec :: Int -> ReadS S3ExportingLocation
Prelude.Read, Int -> S3ExportingLocation -> ShowS
[S3ExportingLocation] -> ShowS
S3ExportingLocation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3ExportingLocation] -> ShowS
$cshowList :: [S3ExportingLocation] -> ShowS
show :: S3ExportingLocation -> String
$cshow :: S3ExportingLocation -> String
showsPrec :: Int -> S3ExportingLocation -> ShowS
$cshowsPrec :: Int -> S3ExportingLocation -> ShowS
Prelude.Show, forall x. Rep S3ExportingLocation x -> S3ExportingLocation
forall x. S3ExportingLocation -> Rep S3ExportingLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3ExportingLocation x -> S3ExportingLocation
$cfrom :: forall x. S3ExportingLocation -> Rep S3ExportingLocation x
Prelude.Generic)
newS3ExportingLocation ::
S3ExportingLocation
newS3ExportingLocation :: S3ExportingLocation
newS3ExportingLocation =
S3ExportingLocation'
{ $sel:s3BucketName:S3ExportingLocation' :: Maybe Text
s3BucketName =
forall a. Maybe a
Prelude.Nothing,
$sel:s3KeyName:S3ExportingLocation' :: Maybe Text
s3KeyName = forall a. Maybe a
Prelude.Nothing
}
s3ExportingLocation_s3BucketName :: Lens.Lens' S3ExportingLocation (Prelude.Maybe Prelude.Text)
s3ExportingLocation_s3BucketName :: Lens' S3ExportingLocation (Maybe Text)
s3ExportingLocation_s3BucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ExportingLocation' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:S3ExportingLocation' :: S3ExportingLocation -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: S3ExportingLocation
s@S3ExportingLocation' {} Maybe Text
a -> S3ExportingLocation
s {$sel:s3BucketName:S3ExportingLocation' :: Maybe Text
s3BucketName = Maybe Text
a} :: S3ExportingLocation)
s3ExportingLocation_s3KeyName :: Lens.Lens' S3ExportingLocation (Prelude.Maybe Prelude.Text)
s3ExportingLocation_s3KeyName :: Lens' S3ExportingLocation (Maybe Text)
s3ExportingLocation_s3KeyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3ExportingLocation' {Maybe Text
s3KeyName :: Maybe Text
$sel:s3KeyName:S3ExportingLocation' :: S3ExportingLocation -> Maybe Text
s3KeyName} -> Maybe Text
s3KeyName) (\s :: S3ExportingLocation
s@S3ExportingLocation' {} Maybe Text
a -> S3ExportingLocation
s {$sel:s3KeyName:S3ExportingLocation' :: Maybe Text
s3KeyName = Maybe Text
a} :: S3ExportingLocation)
instance Data.FromJSON S3ExportingLocation where
parseJSON :: Value -> Parser S3ExportingLocation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"S3ExportingLocation"
( \Object
x ->
Maybe Text -> Maybe Text -> S3ExportingLocation
S3ExportingLocation'
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
"S3BucketName")
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
"S3KeyName")
)
instance Prelude.Hashable S3ExportingLocation where
hashWithSalt :: Int -> S3ExportingLocation -> Int
hashWithSalt Int
_salt S3ExportingLocation' {Maybe Text
s3KeyName :: Maybe Text
s3BucketName :: Maybe Text
$sel:s3KeyName:S3ExportingLocation' :: S3ExportingLocation -> Maybe Text
$sel:s3BucketName:S3ExportingLocation' :: S3ExportingLocation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3BucketName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3KeyName
instance Prelude.NFData S3ExportingLocation where
rnf :: S3ExportingLocation -> ()
rnf S3ExportingLocation' {Maybe Text
s3KeyName :: Maybe Text
s3BucketName :: Maybe Text
$sel:s3KeyName:S3ExportingLocation' :: S3ExportingLocation -> Maybe Text
$sel:s3BucketName:S3ExportingLocation' :: S3ExportingLocation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3BucketName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3KeyName