{-# 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.DataExchange.Types.DataSetEntry where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.Types.AssetType
import Amazonka.DataExchange.Types.Origin
import Amazonka.DataExchange.Types.OriginDetails
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DataSetEntry = DataSetEntry'
{
DataSetEntry -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
DataSetEntry -> Maybe OriginDetails
originDetails :: Prelude.Maybe OriginDetails,
DataSetEntry -> Origin
origin :: Origin,
DataSetEntry -> AssetType
assetType :: AssetType,
DataSetEntry -> Text
description :: Prelude.Text,
DataSetEntry -> POSIX
createdAt :: Core.POSIX,
DataSetEntry -> Text
id :: Prelude.Text,
DataSetEntry -> Text
arn :: Prelude.Text,
DataSetEntry -> POSIX
updatedAt :: Core.POSIX,
DataSetEntry -> Text
name :: Prelude.Text
}
deriving (DataSetEntry -> DataSetEntry -> Bool
(DataSetEntry -> DataSetEntry -> Bool)
-> (DataSetEntry -> DataSetEntry -> Bool) -> Eq DataSetEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSetEntry -> DataSetEntry -> Bool
$c/= :: DataSetEntry -> DataSetEntry -> Bool
== :: DataSetEntry -> DataSetEntry -> Bool
$c== :: DataSetEntry -> DataSetEntry -> Bool
Prelude.Eq, ReadPrec [DataSetEntry]
ReadPrec DataSetEntry
Int -> ReadS DataSetEntry
ReadS [DataSetEntry]
(Int -> ReadS DataSetEntry)
-> ReadS [DataSetEntry]
-> ReadPrec DataSetEntry
-> ReadPrec [DataSetEntry]
-> Read DataSetEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSetEntry]
$creadListPrec :: ReadPrec [DataSetEntry]
readPrec :: ReadPrec DataSetEntry
$creadPrec :: ReadPrec DataSetEntry
readList :: ReadS [DataSetEntry]
$creadList :: ReadS [DataSetEntry]
readsPrec :: Int -> ReadS DataSetEntry
$creadsPrec :: Int -> ReadS DataSetEntry
Prelude.Read, Int -> DataSetEntry -> ShowS
[DataSetEntry] -> ShowS
DataSetEntry -> String
(Int -> DataSetEntry -> ShowS)
-> (DataSetEntry -> String)
-> ([DataSetEntry] -> ShowS)
-> Show DataSetEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSetEntry] -> ShowS
$cshowList :: [DataSetEntry] -> ShowS
show :: DataSetEntry -> String
$cshow :: DataSetEntry -> String
showsPrec :: Int -> DataSetEntry -> ShowS
$cshowsPrec :: Int -> DataSetEntry -> ShowS
Prelude.Show, (forall x. DataSetEntry -> Rep DataSetEntry x)
-> (forall x. Rep DataSetEntry x -> DataSetEntry)
-> Generic DataSetEntry
forall x. Rep DataSetEntry x -> DataSetEntry
forall x. DataSetEntry -> Rep DataSetEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSetEntry x -> DataSetEntry
$cfrom :: forall x. DataSetEntry -> Rep DataSetEntry x
Prelude.Generic)
newDataSetEntry ::
Origin ->
AssetType ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
DataSetEntry
newDataSetEntry :: Origin
-> AssetType
-> Text
-> UTCTime
-> Text
-> Text
-> UTCTime
-> Text
-> DataSetEntry
newDataSetEntry
Origin
pOrigin_
AssetType
pAssetType_
Text
pDescription_
UTCTime
pCreatedAt_
Text
pId_
Text
pArn_
UTCTime
pUpdatedAt_
Text
pName_ =
DataSetEntry' :: Maybe Text
-> Maybe OriginDetails
-> Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry
DataSetEntry'
{ $sel:sourceId:DataSetEntry' :: Maybe Text
sourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:originDetails:DataSetEntry' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
forall a. Maybe a
Prelude.Nothing,
$sel:origin:DataSetEntry' :: Origin
origin = Origin
pOrigin_,
$sel:assetType:DataSetEntry' :: AssetType
assetType = AssetType
pAssetType_,
$sel:description:DataSetEntry' :: Text
description = Text
pDescription_,
$sel:createdAt:DataSetEntry' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:id:DataSetEntry' :: Text
id = Text
pId_,
$sel:arn:DataSetEntry' :: Text
arn = Text
pArn_,
$sel:updatedAt:DataSetEntry' :: POSIX
updatedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_,
$sel:name:DataSetEntry' :: Text
name = Text
pName_
}
dataSetEntry_sourceId :: Lens.Lens' DataSetEntry (Prelude.Maybe Prelude.Text)
dataSetEntry_sourceId :: (Maybe Text -> f (Maybe Text)) -> DataSetEntry -> f DataSetEntry
dataSetEntry_sourceId = (DataSetEntry -> Maybe Text)
-> (DataSetEntry -> Maybe Text -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:DataSetEntry' :: DataSetEntry -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: DataSetEntry
s@DataSetEntry' {} Maybe Text
a -> DataSetEntry
s {$sel:sourceId:DataSetEntry' :: Maybe Text
sourceId = Maybe Text
a} :: DataSetEntry)
dataSetEntry_originDetails :: Lens.Lens' DataSetEntry (Prelude.Maybe OriginDetails)
dataSetEntry_originDetails :: (Maybe OriginDetails -> f (Maybe OriginDetails))
-> DataSetEntry -> f DataSetEntry
dataSetEntry_originDetails = (DataSetEntry -> Maybe OriginDetails)
-> (DataSetEntry -> Maybe OriginDetails -> DataSetEntry)
-> Lens
DataSetEntry
DataSetEntry
(Maybe OriginDetails)
(Maybe OriginDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Maybe OriginDetails
originDetails :: Maybe OriginDetails
$sel:originDetails:DataSetEntry' :: DataSetEntry -> Maybe OriginDetails
originDetails} -> Maybe OriginDetails
originDetails) (\s :: DataSetEntry
s@DataSetEntry' {} Maybe OriginDetails
a -> DataSetEntry
s {$sel:originDetails:DataSetEntry' :: Maybe OriginDetails
originDetails = Maybe OriginDetails
a} :: DataSetEntry)
dataSetEntry_origin :: Lens.Lens' DataSetEntry Origin
dataSetEntry_origin :: (Origin -> f Origin) -> DataSetEntry -> f DataSetEntry
dataSetEntry_origin = (DataSetEntry -> Origin)
-> (DataSetEntry -> Origin -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry Origin Origin
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Origin
origin :: Origin
$sel:origin:DataSetEntry' :: DataSetEntry -> Origin
origin} -> Origin
origin) (\s :: DataSetEntry
s@DataSetEntry' {} Origin
a -> DataSetEntry
s {$sel:origin:DataSetEntry' :: Origin
origin = Origin
a} :: DataSetEntry)
dataSetEntry_assetType :: Lens.Lens' DataSetEntry AssetType
dataSetEntry_assetType :: (AssetType -> f AssetType) -> DataSetEntry -> f DataSetEntry
dataSetEntry_assetType = (DataSetEntry -> AssetType)
-> (DataSetEntry -> AssetType -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry AssetType AssetType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {AssetType
assetType :: AssetType
$sel:assetType:DataSetEntry' :: DataSetEntry -> AssetType
assetType} -> AssetType
assetType) (\s :: DataSetEntry
s@DataSetEntry' {} AssetType
a -> DataSetEntry
s {$sel:assetType:DataSetEntry' :: AssetType
assetType = AssetType
a} :: DataSetEntry)
dataSetEntry_description :: Lens.Lens' DataSetEntry Prelude.Text
dataSetEntry_description :: (Text -> f Text) -> DataSetEntry -> f DataSetEntry
dataSetEntry_description = (DataSetEntry -> Text)
-> (DataSetEntry -> Text -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Text
description :: Text
$sel:description:DataSetEntry' :: DataSetEntry -> Text
description} -> Text
description) (\s :: DataSetEntry
s@DataSetEntry' {} Text
a -> DataSetEntry
s {$sel:description:DataSetEntry' :: Text
description = Text
a} :: DataSetEntry)
dataSetEntry_createdAt :: Lens.Lens' DataSetEntry Prelude.UTCTime
dataSetEntry_createdAt :: (UTCTime -> f UTCTime) -> DataSetEntry -> f DataSetEntry
dataSetEntry_createdAt = (DataSetEntry -> POSIX)
-> (DataSetEntry -> POSIX -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {POSIX
createdAt :: POSIX
$sel:createdAt:DataSetEntry' :: DataSetEntry -> POSIX
createdAt} -> POSIX
createdAt) (\s :: DataSetEntry
s@DataSetEntry' {} POSIX
a -> DataSetEntry
s {$sel:createdAt:DataSetEntry' :: POSIX
createdAt = POSIX
a} :: DataSetEntry) ((POSIX -> f POSIX) -> DataSetEntry -> f DataSetEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DataSetEntry
-> f DataSetEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
dataSetEntry_id :: Lens.Lens' DataSetEntry Prelude.Text
dataSetEntry_id :: (Text -> f Text) -> DataSetEntry -> f DataSetEntry
dataSetEntry_id = (DataSetEntry -> Text)
-> (DataSetEntry -> Text -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Text
id :: Text
$sel:id:DataSetEntry' :: DataSetEntry -> Text
id} -> Text
id) (\s :: DataSetEntry
s@DataSetEntry' {} Text
a -> DataSetEntry
s {$sel:id:DataSetEntry' :: Text
id = Text
a} :: DataSetEntry)
dataSetEntry_arn :: Lens.Lens' DataSetEntry Prelude.Text
dataSetEntry_arn :: (Text -> f Text) -> DataSetEntry -> f DataSetEntry
dataSetEntry_arn = (DataSetEntry -> Text)
-> (DataSetEntry -> Text -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Text
arn :: Text
$sel:arn:DataSetEntry' :: DataSetEntry -> Text
arn} -> Text
arn) (\s :: DataSetEntry
s@DataSetEntry' {} Text
a -> DataSetEntry
s {$sel:arn:DataSetEntry' :: Text
arn = Text
a} :: DataSetEntry)
dataSetEntry_updatedAt :: Lens.Lens' DataSetEntry Prelude.UTCTime
dataSetEntry_updatedAt :: (UTCTime -> f UTCTime) -> DataSetEntry -> f DataSetEntry
dataSetEntry_updatedAt = (DataSetEntry -> POSIX)
-> (DataSetEntry -> POSIX -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {POSIX
updatedAt :: POSIX
$sel:updatedAt:DataSetEntry' :: DataSetEntry -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: DataSetEntry
s@DataSetEntry' {} POSIX
a -> DataSetEntry
s {$sel:updatedAt:DataSetEntry' :: POSIX
updatedAt = POSIX
a} :: DataSetEntry) ((POSIX -> f POSIX) -> DataSetEntry -> f DataSetEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DataSetEntry
-> f DataSetEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
dataSetEntry_name :: Lens.Lens' DataSetEntry Prelude.Text
dataSetEntry_name :: (Text -> f Text) -> DataSetEntry -> f DataSetEntry
dataSetEntry_name = (DataSetEntry -> Text)
-> (DataSetEntry -> Text -> DataSetEntry)
-> Lens DataSetEntry DataSetEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSetEntry' {Text
name :: Text
$sel:name:DataSetEntry' :: DataSetEntry -> Text
name} -> Text
name) (\s :: DataSetEntry
s@DataSetEntry' {} Text
a -> DataSetEntry
s {$sel:name:DataSetEntry' :: Text
name = Text
a} :: DataSetEntry)
instance Core.FromJSON DataSetEntry where
parseJSON :: Value -> Parser DataSetEntry
parseJSON =
String
-> (Object -> Parser DataSetEntry) -> Value -> Parser DataSetEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DataSetEntry"
( \Object
x ->
Maybe Text
-> Maybe OriginDetails
-> Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry
DataSetEntry'
(Maybe Text
-> Maybe OriginDetails
-> Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry)
-> Parser (Maybe Text)
-> Parser
(Maybe OriginDetails
-> Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceId")
Parser
(Maybe OriginDetails
-> Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry)
-> Parser (Maybe OriginDetails)
-> Parser
(Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OriginDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OriginDetails")
Parser
(Origin
-> AssetType
-> Text
-> POSIX
-> Text
-> Text
-> POSIX
-> Text
-> DataSetEntry)
-> Parser Origin
-> Parser
(AssetType
-> Text -> POSIX -> Text -> Text -> POSIX -> Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Origin
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Origin")
Parser
(AssetType
-> Text -> POSIX -> Text -> Text -> POSIX -> Text -> DataSetEntry)
-> Parser AssetType
-> Parser
(Text -> POSIX -> Text -> Text -> POSIX -> Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AssetType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AssetType")
Parser
(Text -> POSIX -> Text -> Text -> POSIX -> Text -> DataSetEntry)
-> Parser Text
-> Parser (POSIX -> Text -> Text -> POSIX -> Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Description")
Parser (POSIX -> Text -> Text -> POSIX -> Text -> DataSetEntry)
-> Parser POSIX
-> Parser (Text -> Text -> POSIX -> Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreatedAt")
Parser (Text -> Text -> POSIX -> Text -> DataSetEntry)
-> Parser Text -> Parser (Text -> POSIX -> Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
Parser (Text -> POSIX -> Text -> DataSetEntry)
-> Parser Text -> Parser (POSIX -> Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
Parser (POSIX -> Text -> DataSetEntry)
-> Parser POSIX -> Parser (Text -> DataSetEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"UpdatedAt")
Parser (Text -> DataSetEntry) -> Parser Text -> Parser DataSetEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
)
instance Prelude.Hashable DataSetEntry
instance Prelude.NFData DataSetEntry