{-# 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.S3SnapshotAsset 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 S3SnapshotAsset = S3SnapshotAsset'
{
S3SnapshotAsset -> Double
size :: Prelude.Double
}
deriving (S3SnapshotAsset -> S3SnapshotAsset -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3SnapshotAsset -> S3SnapshotAsset -> Bool
$c/= :: S3SnapshotAsset -> S3SnapshotAsset -> Bool
== :: S3SnapshotAsset -> S3SnapshotAsset -> Bool
$c== :: S3SnapshotAsset -> S3SnapshotAsset -> Bool
Prelude.Eq, ReadPrec [S3SnapshotAsset]
ReadPrec S3SnapshotAsset
Int -> ReadS S3SnapshotAsset
ReadS [S3SnapshotAsset]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3SnapshotAsset]
$creadListPrec :: ReadPrec [S3SnapshotAsset]
readPrec :: ReadPrec S3SnapshotAsset
$creadPrec :: ReadPrec S3SnapshotAsset
readList :: ReadS [S3SnapshotAsset]
$creadList :: ReadS [S3SnapshotAsset]
readsPrec :: Int -> ReadS S3SnapshotAsset
$creadsPrec :: Int -> ReadS S3SnapshotAsset
Prelude.Read, Int -> S3SnapshotAsset -> ShowS
[S3SnapshotAsset] -> ShowS
S3SnapshotAsset -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3SnapshotAsset] -> ShowS
$cshowList :: [S3SnapshotAsset] -> ShowS
show :: S3SnapshotAsset -> String
$cshow :: S3SnapshotAsset -> String
showsPrec :: Int -> S3SnapshotAsset -> ShowS
$cshowsPrec :: Int -> S3SnapshotAsset -> ShowS
Prelude.Show, forall x. Rep S3SnapshotAsset x -> S3SnapshotAsset
forall x. S3SnapshotAsset -> Rep S3SnapshotAsset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3SnapshotAsset x -> S3SnapshotAsset
$cfrom :: forall x. S3SnapshotAsset -> Rep S3SnapshotAsset x
Prelude.Generic)
newS3SnapshotAsset ::
Prelude.Double ->
S3SnapshotAsset
newS3SnapshotAsset :: Double -> S3SnapshotAsset
newS3SnapshotAsset Double
pSize_ =
S3SnapshotAsset' {$sel:size:S3SnapshotAsset' :: Double
size = Double
pSize_}
s3SnapshotAsset_size :: Lens.Lens' S3SnapshotAsset Prelude.Double
s3SnapshotAsset_size :: Lens' S3SnapshotAsset Double
s3SnapshotAsset_size = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3SnapshotAsset' {Double
size :: Double
$sel:size:S3SnapshotAsset' :: S3SnapshotAsset -> Double
size} -> Double
size) (\s :: S3SnapshotAsset
s@S3SnapshotAsset' {} Double
a -> S3SnapshotAsset
s {$sel:size:S3SnapshotAsset' :: Double
size = Double
a} :: S3SnapshotAsset)
instance Data.FromJSON S3SnapshotAsset where
parseJSON :: Value -> Parser S3SnapshotAsset
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"S3SnapshotAsset"
( \Object
x ->
Double -> S3SnapshotAsset
S3SnapshotAsset' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Size")
)
instance Prelude.Hashable S3SnapshotAsset where
hashWithSalt :: Int -> S3SnapshotAsset -> Int
hashWithSalt Int
_salt S3SnapshotAsset' {Double
size :: Double
$sel:size:S3SnapshotAsset' :: S3SnapshotAsset -> Double
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Double
size
instance Prelude.NFData S3SnapshotAsset where
rnf :: S3SnapshotAsset -> ()
rnf S3SnapshotAsset' {Double
size :: Double
$sel:size:S3SnapshotAsset' :: S3SnapshotAsset -> Double
..} = forall a. NFData a => a -> ()
Prelude.rnf Double
size