{-# 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.AssetEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DataExchange.Types.AssetDetails
import Amazonka.DataExchange.Types.AssetType
import qualified Amazonka.Prelude as Prelude
data AssetEntry = AssetEntry'
{
AssetEntry -> Maybe Text
sourceId :: Prelude.Maybe Prelude.Text,
AssetEntry -> Text
arn :: Prelude.Text,
AssetEntry -> AssetDetails
assetDetails :: AssetDetails,
AssetEntry -> AssetType
assetType :: AssetType,
AssetEntry -> ISO8601
createdAt :: Data.ISO8601,
AssetEntry -> Text
dataSetId :: Prelude.Text,
AssetEntry -> Text
id :: Prelude.Text,
AssetEntry -> Text
name :: Prelude.Text,
AssetEntry -> Text
revisionId :: Prelude.Text,
AssetEntry -> ISO8601
updatedAt :: Data.ISO8601
}
deriving (AssetEntry -> AssetEntry -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssetEntry -> AssetEntry -> Bool
$c/= :: AssetEntry -> AssetEntry -> Bool
== :: AssetEntry -> AssetEntry -> Bool
$c== :: AssetEntry -> AssetEntry -> Bool
Prelude.Eq, ReadPrec [AssetEntry]
ReadPrec AssetEntry
Int -> ReadS AssetEntry
ReadS [AssetEntry]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssetEntry]
$creadListPrec :: ReadPrec [AssetEntry]
readPrec :: ReadPrec AssetEntry
$creadPrec :: ReadPrec AssetEntry
readList :: ReadS [AssetEntry]
$creadList :: ReadS [AssetEntry]
readsPrec :: Int -> ReadS AssetEntry
$creadsPrec :: Int -> ReadS AssetEntry
Prelude.Read, Int -> AssetEntry -> ShowS
[AssetEntry] -> ShowS
AssetEntry -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssetEntry] -> ShowS
$cshowList :: [AssetEntry] -> ShowS
show :: AssetEntry -> String
$cshow :: AssetEntry -> String
showsPrec :: Int -> AssetEntry -> ShowS
$cshowsPrec :: Int -> AssetEntry -> ShowS
Prelude.Show, forall x. Rep AssetEntry x -> AssetEntry
forall x. AssetEntry -> Rep AssetEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssetEntry x -> AssetEntry
$cfrom :: forall x. AssetEntry -> Rep AssetEntry x
Prelude.Generic)
newAssetEntry ::
Prelude.Text ->
AssetDetails ->
AssetType ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
AssetEntry
newAssetEntry :: Text
-> AssetDetails
-> AssetType
-> UTCTime
-> Text
-> Text
-> Text
-> Text
-> UTCTime
-> AssetEntry
newAssetEntry
Text
pArn_
AssetDetails
pAssetDetails_
AssetType
pAssetType_
UTCTime
pCreatedAt_
Text
pDataSetId_
Text
pId_
Text
pName_
Text
pRevisionId_
UTCTime
pUpdatedAt_ =
AssetEntry'
{ $sel:sourceId:AssetEntry' :: Maybe Text
sourceId = forall a. Maybe a
Prelude.Nothing,
$sel:arn:AssetEntry' :: Text
arn = Text
pArn_,
$sel:assetDetails:AssetEntry' :: AssetDetails
assetDetails = AssetDetails
pAssetDetails_,
$sel:assetType:AssetEntry' :: AssetType
assetType = AssetType
pAssetType_,
$sel:createdAt:AssetEntry' :: ISO8601
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:dataSetId:AssetEntry' :: Text
dataSetId = Text
pDataSetId_,
$sel:id:AssetEntry' :: Text
id = Text
pId_,
$sel:name:AssetEntry' :: Text
name = Text
pName_,
$sel:revisionId:AssetEntry' :: Text
revisionId = Text
pRevisionId_,
$sel:updatedAt:AssetEntry' :: ISO8601
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_
}
assetEntry_sourceId :: Lens.Lens' AssetEntry (Prelude.Maybe Prelude.Text)
assetEntry_sourceId :: Lens' AssetEntry (Maybe Text)
assetEntry_sourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {Maybe Text
sourceId :: Maybe Text
$sel:sourceId:AssetEntry' :: AssetEntry -> Maybe Text
sourceId} -> Maybe Text
sourceId) (\s :: AssetEntry
s@AssetEntry' {} Maybe Text
a -> AssetEntry
s {$sel:sourceId:AssetEntry' :: Maybe Text
sourceId = Maybe Text
a} :: AssetEntry)
assetEntry_arn :: Lens.Lens' AssetEntry Prelude.Text
assetEntry_arn :: Lens' AssetEntry Text
assetEntry_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {Text
arn :: Text
$sel:arn:AssetEntry' :: AssetEntry -> Text
arn} -> Text
arn) (\s :: AssetEntry
s@AssetEntry' {} Text
a -> AssetEntry
s {$sel:arn:AssetEntry' :: Text
arn = Text
a} :: AssetEntry)
assetEntry_assetDetails :: Lens.Lens' AssetEntry AssetDetails
assetEntry_assetDetails :: Lens' AssetEntry AssetDetails
assetEntry_assetDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {AssetDetails
assetDetails :: AssetDetails
$sel:assetDetails:AssetEntry' :: AssetEntry -> AssetDetails
assetDetails} -> AssetDetails
assetDetails) (\s :: AssetEntry
s@AssetEntry' {} AssetDetails
a -> AssetEntry
s {$sel:assetDetails:AssetEntry' :: AssetDetails
assetDetails = AssetDetails
a} :: AssetEntry)
assetEntry_assetType :: Lens.Lens' AssetEntry AssetType
assetEntry_assetType :: Lens' AssetEntry AssetType
assetEntry_assetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {AssetType
assetType :: AssetType
$sel:assetType:AssetEntry' :: AssetEntry -> AssetType
assetType} -> AssetType
assetType) (\s :: AssetEntry
s@AssetEntry' {} AssetType
a -> AssetEntry
s {$sel:assetType:AssetEntry' :: AssetType
assetType = AssetType
a} :: AssetEntry)
assetEntry_createdAt :: Lens.Lens' AssetEntry Prelude.UTCTime
assetEntry_createdAt :: Lens' AssetEntry UTCTime
assetEntry_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {ISO8601
createdAt :: ISO8601
$sel:createdAt:AssetEntry' :: AssetEntry -> ISO8601
createdAt} -> ISO8601
createdAt) (\s :: AssetEntry
s@AssetEntry' {} ISO8601
a -> AssetEntry
s {$sel:createdAt:AssetEntry' :: ISO8601
createdAt = ISO8601
a} :: AssetEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
assetEntry_dataSetId :: Lens.Lens' AssetEntry Prelude.Text
assetEntry_dataSetId :: Lens' AssetEntry Text
assetEntry_dataSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {Text
dataSetId :: Text
$sel:dataSetId:AssetEntry' :: AssetEntry -> Text
dataSetId} -> Text
dataSetId) (\s :: AssetEntry
s@AssetEntry' {} Text
a -> AssetEntry
s {$sel:dataSetId:AssetEntry' :: Text
dataSetId = Text
a} :: AssetEntry)
assetEntry_id :: Lens.Lens' AssetEntry Prelude.Text
assetEntry_id :: Lens' AssetEntry Text
assetEntry_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {Text
id :: Text
$sel:id:AssetEntry' :: AssetEntry -> Text
id} -> Text
id) (\s :: AssetEntry
s@AssetEntry' {} Text
a -> AssetEntry
s {$sel:id:AssetEntry' :: Text
id = Text
a} :: AssetEntry)
assetEntry_name :: Lens.Lens' AssetEntry Prelude.Text
assetEntry_name :: Lens' AssetEntry Text
assetEntry_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {Text
name :: Text
$sel:name:AssetEntry' :: AssetEntry -> Text
name} -> Text
name) (\s :: AssetEntry
s@AssetEntry' {} Text
a -> AssetEntry
s {$sel:name:AssetEntry' :: Text
name = Text
a} :: AssetEntry)
assetEntry_revisionId :: Lens.Lens' AssetEntry Prelude.Text
assetEntry_revisionId :: Lens' AssetEntry Text
assetEntry_revisionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {Text
revisionId :: Text
$sel:revisionId:AssetEntry' :: AssetEntry -> Text
revisionId} -> Text
revisionId) (\s :: AssetEntry
s@AssetEntry' {} Text
a -> AssetEntry
s {$sel:revisionId:AssetEntry' :: Text
revisionId = Text
a} :: AssetEntry)
assetEntry_updatedAt :: Lens.Lens' AssetEntry Prelude.UTCTime
assetEntry_updatedAt :: Lens' AssetEntry UTCTime
assetEntry_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetEntry' {ISO8601
updatedAt :: ISO8601
$sel:updatedAt:AssetEntry' :: AssetEntry -> ISO8601
updatedAt} -> ISO8601
updatedAt) (\s :: AssetEntry
s@AssetEntry' {} ISO8601
a -> AssetEntry
s {$sel:updatedAt:AssetEntry' :: ISO8601
updatedAt = ISO8601
a} :: AssetEntry) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON AssetEntry where
parseJSON :: Value -> Parser AssetEntry
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AssetEntry"
( \Object
x ->
Maybe Text
-> Text
-> AssetDetails
-> AssetType
-> ISO8601
-> Text
-> Text
-> Text
-> Text
-> ISO8601
-> AssetEntry
AssetEntry'
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
"SourceId")
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
"Arn")
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
"AssetDetails")
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
"AssetType")
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
"CreatedAt")
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
"DataSetId")
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
"Id")
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
"Name")
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
"RevisionId")
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
"UpdatedAt")
)
instance Prelude.Hashable AssetEntry where
hashWithSalt :: Int -> AssetEntry -> Int
hashWithSalt Int
_salt AssetEntry' {Maybe Text
Text
ISO8601
AssetType
AssetDetails
updatedAt :: ISO8601
revisionId :: Text
name :: Text
id :: Text
dataSetId :: Text
createdAt :: ISO8601
assetType :: AssetType
assetDetails :: AssetDetails
arn :: Text
sourceId :: Maybe Text
$sel:updatedAt:AssetEntry' :: AssetEntry -> ISO8601
$sel:revisionId:AssetEntry' :: AssetEntry -> Text
$sel:name:AssetEntry' :: AssetEntry -> Text
$sel:id:AssetEntry' :: AssetEntry -> Text
$sel:dataSetId:AssetEntry' :: AssetEntry -> Text
$sel:createdAt:AssetEntry' :: AssetEntry -> ISO8601
$sel:assetType:AssetEntry' :: AssetEntry -> AssetType
$sel:assetDetails:AssetEntry' :: AssetEntry -> AssetDetails
$sel:arn:AssetEntry' :: AssetEntry -> Text
$sel:sourceId:AssetEntry' :: AssetEntry -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AssetDetails
assetDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AssetType
assetType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataSetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
revisionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
updatedAt
instance Prelude.NFData AssetEntry where
rnf :: AssetEntry -> ()
rnf AssetEntry' {Maybe Text
Text
ISO8601
AssetType
AssetDetails
updatedAt :: ISO8601
revisionId :: Text
name :: Text
id :: Text
dataSetId :: Text
createdAt :: ISO8601
assetType :: AssetType
assetDetails :: AssetDetails
arn :: Text
sourceId :: Maybe Text
$sel:updatedAt:AssetEntry' :: AssetEntry -> ISO8601
$sel:revisionId:AssetEntry' :: AssetEntry -> Text
$sel:name:AssetEntry' :: AssetEntry -> Text
$sel:id:AssetEntry' :: AssetEntry -> Text
$sel:dataSetId:AssetEntry' :: AssetEntry -> Text
$sel:createdAt:AssetEntry' :: AssetEntry -> ISO8601
$sel:assetType:AssetEntry' :: AssetEntry -> AssetType
$sel:assetDetails:AssetEntry' :: AssetEntry -> AssetDetails
$sel:arn:AssetEntry' :: AssetEntry -> Text
$sel:sourceId:AssetEntry' :: AssetEntry -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AssetDetails
assetDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AssetType
assetType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataSetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
revisionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
updatedAt