{-# 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.Pinpoint.Types.ExportJobResource 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 ExportJobResource = ExportJobResource'
{
ExportJobResource -> Maybe Text
segmentId :: Prelude.Maybe Prelude.Text,
ExportJobResource -> Maybe Int
segmentVersion :: Prelude.Maybe Prelude.Int,
ExportJobResource -> Text
s3UrlPrefix :: Prelude.Text,
ExportJobResource -> Text
roleArn :: Prelude.Text
}
deriving (ExportJobResource -> ExportJobResource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportJobResource -> ExportJobResource -> Bool
$c/= :: ExportJobResource -> ExportJobResource -> Bool
== :: ExportJobResource -> ExportJobResource -> Bool
$c== :: ExportJobResource -> ExportJobResource -> Bool
Prelude.Eq, ReadPrec [ExportJobResource]
ReadPrec ExportJobResource
Int -> ReadS ExportJobResource
ReadS [ExportJobResource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportJobResource]
$creadListPrec :: ReadPrec [ExportJobResource]
readPrec :: ReadPrec ExportJobResource
$creadPrec :: ReadPrec ExportJobResource
readList :: ReadS [ExportJobResource]
$creadList :: ReadS [ExportJobResource]
readsPrec :: Int -> ReadS ExportJobResource
$creadsPrec :: Int -> ReadS ExportJobResource
Prelude.Read, Int -> ExportJobResource -> ShowS
[ExportJobResource] -> ShowS
ExportJobResource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportJobResource] -> ShowS
$cshowList :: [ExportJobResource] -> ShowS
show :: ExportJobResource -> String
$cshow :: ExportJobResource -> String
showsPrec :: Int -> ExportJobResource -> ShowS
$cshowsPrec :: Int -> ExportJobResource -> ShowS
Prelude.Show, forall x. Rep ExportJobResource x -> ExportJobResource
forall x. ExportJobResource -> Rep ExportJobResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportJobResource x -> ExportJobResource
$cfrom :: forall x. ExportJobResource -> Rep ExportJobResource x
Prelude.Generic)
newExportJobResource ::
Prelude.Text ->
Prelude.Text ->
ExportJobResource
newExportJobResource :: Text -> Text -> ExportJobResource
newExportJobResource Text
pS3UrlPrefix_ Text
pRoleArn_ =
ExportJobResource'
{ $sel:segmentId:ExportJobResource' :: Maybe Text
segmentId = forall a. Maybe a
Prelude.Nothing,
$sel:segmentVersion:ExportJobResource' :: Maybe Int
segmentVersion = forall a. Maybe a
Prelude.Nothing,
$sel:s3UrlPrefix:ExportJobResource' :: Text
s3UrlPrefix = Text
pS3UrlPrefix_,
$sel:roleArn:ExportJobResource' :: Text
roleArn = Text
pRoleArn_
}
exportJobResource_segmentId :: Lens.Lens' ExportJobResource (Prelude.Maybe Prelude.Text)
exportJobResource_segmentId :: Lens' ExportJobResource (Maybe Text)
exportJobResource_segmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResource' {Maybe Text
segmentId :: Maybe Text
$sel:segmentId:ExportJobResource' :: ExportJobResource -> Maybe Text
segmentId} -> Maybe Text
segmentId) (\s :: ExportJobResource
s@ExportJobResource' {} Maybe Text
a -> ExportJobResource
s {$sel:segmentId:ExportJobResource' :: Maybe Text
segmentId = Maybe Text
a} :: ExportJobResource)
exportJobResource_segmentVersion :: Lens.Lens' ExportJobResource (Prelude.Maybe Prelude.Int)
exportJobResource_segmentVersion :: Lens' ExportJobResource (Maybe Int)
exportJobResource_segmentVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResource' {Maybe Int
segmentVersion :: Maybe Int
$sel:segmentVersion:ExportJobResource' :: ExportJobResource -> Maybe Int
segmentVersion} -> Maybe Int
segmentVersion) (\s :: ExportJobResource
s@ExportJobResource' {} Maybe Int
a -> ExportJobResource
s {$sel:segmentVersion:ExportJobResource' :: Maybe Int
segmentVersion = Maybe Int
a} :: ExportJobResource)
exportJobResource_s3UrlPrefix :: Lens.Lens' ExportJobResource Prelude.Text
exportJobResource_s3UrlPrefix :: Lens' ExportJobResource Text
exportJobResource_s3UrlPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResource' {Text
s3UrlPrefix :: Text
$sel:s3UrlPrefix:ExportJobResource' :: ExportJobResource -> Text
s3UrlPrefix} -> Text
s3UrlPrefix) (\s :: ExportJobResource
s@ExportJobResource' {} Text
a -> ExportJobResource
s {$sel:s3UrlPrefix:ExportJobResource' :: Text
s3UrlPrefix = Text
a} :: ExportJobResource)
exportJobResource_roleArn :: Lens.Lens' ExportJobResource Prelude.Text
exportJobResource_roleArn :: Lens' ExportJobResource Text
exportJobResource_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportJobResource' {Text
roleArn :: Text
$sel:roleArn:ExportJobResource' :: ExportJobResource -> Text
roleArn} -> Text
roleArn) (\s :: ExportJobResource
s@ExportJobResource' {} Text
a -> ExportJobResource
s {$sel:roleArn:ExportJobResource' :: Text
roleArn = Text
a} :: ExportJobResource)
instance Data.FromJSON ExportJobResource where
parseJSON :: Value -> Parser ExportJobResource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ExportJobResource"
( \Object
x ->
Maybe Text -> Maybe Int -> Text -> Text -> ExportJobResource
ExportJobResource'
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
"SegmentId")
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
"SegmentVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"S3UrlPrefix")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"RoleArn")
)
instance Prelude.Hashable ExportJobResource where
hashWithSalt :: Int -> ExportJobResource -> Int
hashWithSalt Int
_salt ExportJobResource' {Maybe Int
Maybe Text
Text
roleArn :: Text
s3UrlPrefix :: Text
segmentVersion :: Maybe Int
segmentId :: Maybe Text
$sel:roleArn:ExportJobResource' :: ExportJobResource -> Text
$sel:s3UrlPrefix:ExportJobResource' :: ExportJobResource -> Text
$sel:segmentVersion:ExportJobResource' :: ExportJobResource -> Maybe Int
$sel:segmentId:ExportJobResource' :: ExportJobResource -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
segmentId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
segmentVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
s3UrlPrefix
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
instance Prelude.NFData ExportJobResource where
rnf :: ExportJobResource -> ()
rnf ExportJobResource' {Maybe Int
Maybe Text
Text
roleArn :: Text
s3UrlPrefix :: Text
segmentVersion :: Maybe Int
segmentId :: Maybe Text
$sel:roleArn:ExportJobResource' :: ExportJobResource -> Text
$sel:s3UrlPrefix:ExportJobResource' :: ExportJobResource -> Text
$sel:segmentVersion:ExportJobResource' :: ExportJobResource -> Maybe Int
$sel:segmentId:ExportJobResource' :: ExportJobResource -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
segmentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
segmentVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
s3UrlPrefix
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn