{-# 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.IoTAnalytics.Types.DatastoreStorageSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTAnalytics.Types.CustomerManagedDatastoreS3StorageSummary
import Amazonka.IoTAnalytics.Types.DatastoreIotSiteWiseMultiLayerStorageSummary
import Amazonka.IoTAnalytics.Types.ServiceManagedDatastoreS3StorageSummary
import qualified Amazonka.Prelude as Prelude
data DatastoreStorageSummary = DatastoreStorageSummary'
{
DatastoreStorageSummary
-> Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3 :: Prelude.Maybe CustomerManagedDatastoreS3StorageSummary,
DatastoreStorageSummary
-> Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage :: Prelude.Maybe DatastoreIotSiteWiseMultiLayerStorageSummary,
DatastoreStorageSummary
-> Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3 :: Prelude.Maybe ServiceManagedDatastoreS3StorageSummary
}
deriving (DatastoreStorageSummary -> DatastoreStorageSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatastoreStorageSummary -> DatastoreStorageSummary -> Bool
$c/= :: DatastoreStorageSummary -> DatastoreStorageSummary -> Bool
== :: DatastoreStorageSummary -> DatastoreStorageSummary -> Bool
$c== :: DatastoreStorageSummary -> DatastoreStorageSummary -> Bool
Prelude.Eq, ReadPrec [DatastoreStorageSummary]
ReadPrec DatastoreStorageSummary
Int -> ReadS DatastoreStorageSummary
ReadS [DatastoreStorageSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatastoreStorageSummary]
$creadListPrec :: ReadPrec [DatastoreStorageSummary]
readPrec :: ReadPrec DatastoreStorageSummary
$creadPrec :: ReadPrec DatastoreStorageSummary
readList :: ReadS [DatastoreStorageSummary]
$creadList :: ReadS [DatastoreStorageSummary]
readsPrec :: Int -> ReadS DatastoreStorageSummary
$creadsPrec :: Int -> ReadS DatastoreStorageSummary
Prelude.Read, Int -> DatastoreStorageSummary -> ShowS
[DatastoreStorageSummary] -> ShowS
DatastoreStorageSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatastoreStorageSummary] -> ShowS
$cshowList :: [DatastoreStorageSummary] -> ShowS
show :: DatastoreStorageSummary -> String
$cshow :: DatastoreStorageSummary -> String
showsPrec :: Int -> DatastoreStorageSummary -> ShowS
$cshowsPrec :: Int -> DatastoreStorageSummary -> ShowS
Prelude.Show, forall x. Rep DatastoreStorageSummary x -> DatastoreStorageSummary
forall x. DatastoreStorageSummary -> Rep DatastoreStorageSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatastoreStorageSummary x -> DatastoreStorageSummary
$cfrom :: forall x. DatastoreStorageSummary -> Rep DatastoreStorageSummary x
Prelude.Generic)
newDatastoreStorageSummary ::
DatastoreStorageSummary
newDatastoreStorageSummary :: DatastoreStorageSummary
newDatastoreStorageSummary =
DatastoreStorageSummary'
{ $sel:customerManagedS3:DatastoreStorageSummary' :: Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3 =
forall a. Maybe a
Prelude.Nothing,
$sel:iotSiteWiseMultiLayerStorage:DatastoreStorageSummary' :: Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage = forall a. Maybe a
Prelude.Nothing,
$sel:serviceManagedS3:DatastoreStorageSummary' :: Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3 = forall a. Maybe a
Prelude.Nothing
}
datastoreStorageSummary_customerManagedS3 :: Lens.Lens' DatastoreStorageSummary (Prelude.Maybe CustomerManagedDatastoreS3StorageSummary)
datastoreStorageSummary_customerManagedS3 :: Lens'
DatastoreStorageSummary
(Maybe CustomerManagedDatastoreS3StorageSummary)
datastoreStorageSummary_customerManagedS3 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreStorageSummary' {Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3 :: Maybe CustomerManagedDatastoreS3StorageSummary
$sel:customerManagedS3:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3} -> Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3) (\s :: DatastoreStorageSummary
s@DatastoreStorageSummary' {} Maybe CustomerManagedDatastoreS3StorageSummary
a -> DatastoreStorageSummary
s {$sel:customerManagedS3:DatastoreStorageSummary' :: Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3 = Maybe CustomerManagedDatastoreS3StorageSummary
a} :: DatastoreStorageSummary)
datastoreStorageSummary_iotSiteWiseMultiLayerStorage :: Lens.Lens' DatastoreStorageSummary (Prelude.Maybe DatastoreIotSiteWiseMultiLayerStorageSummary)
datastoreStorageSummary_iotSiteWiseMultiLayerStorage :: Lens'
DatastoreStorageSummary
(Maybe DatastoreIotSiteWiseMultiLayerStorageSummary)
datastoreStorageSummary_iotSiteWiseMultiLayerStorage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreStorageSummary' {Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage :: Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
$sel:iotSiteWiseMultiLayerStorage:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage} -> Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage) (\s :: DatastoreStorageSummary
s@DatastoreStorageSummary' {} Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
a -> DatastoreStorageSummary
s {$sel:iotSiteWiseMultiLayerStorage:DatastoreStorageSummary' :: Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage = Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
a} :: DatastoreStorageSummary)
datastoreStorageSummary_serviceManagedS3 :: Lens.Lens' DatastoreStorageSummary (Prelude.Maybe ServiceManagedDatastoreS3StorageSummary)
datastoreStorageSummary_serviceManagedS3 :: Lens'
DatastoreStorageSummary
(Maybe ServiceManagedDatastoreS3StorageSummary)
datastoreStorageSummary_serviceManagedS3 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreStorageSummary' {Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3 :: Maybe ServiceManagedDatastoreS3StorageSummary
$sel:serviceManagedS3:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3} -> Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3) (\s :: DatastoreStorageSummary
s@DatastoreStorageSummary' {} Maybe ServiceManagedDatastoreS3StorageSummary
a -> DatastoreStorageSummary
s {$sel:serviceManagedS3:DatastoreStorageSummary' :: Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3 = Maybe ServiceManagedDatastoreS3StorageSummary
a} :: DatastoreStorageSummary)
instance Data.FromJSON DatastoreStorageSummary where
parseJSON :: Value -> Parser DatastoreStorageSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DatastoreStorageSummary"
( \Object
x ->
Maybe CustomerManagedDatastoreS3StorageSummary
-> Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
-> Maybe ServiceManagedDatastoreS3StorageSummary
-> DatastoreStorageSummary
DatastoreStorageSummary'
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
"customerManagedS3")
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
"iotSiteWiseMultiLayerStorage")
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
"serviceManagedS3")
)
instance Prelude.Hashable DatastoreStorageSummary where
hashWithSalt :: Int -> DatastoreStorageSummary -> Int
hashWithSalt Int
_salt DatastoreStorageSummary' {Maybe CustomerManagedDatastoreS3StorageSummary
Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3 :: Maybe ServiceManagedDatastoreS3StorageSummary
iotSiteWiseMultiLayerStorage :: Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
customerManagedS3 :: Maybe CustomerManagedDatastoreS3StorageSummary
$sel:serviceManagedS3:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe ServiceManagedDatastoreS3StorageSummary
$sel:iotSiteWiseMultiLayerStorage:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
$sel:customerManagedS3:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe CustomerManagedDatastoreS3StorageSummary
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3
instance Prelude.NFData DatastoreStorageSummary where
rnf :: DatastoreStorageSummary -> ()
rnf DatastoreStorageSummary' {Maybe CustomerManagedDatastoreS3StorageSummary
Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3 :: Maybe ServiceManagedDatastoreS3StorageSummary
iotSiteWiseMultiLayerStorage :: Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
customerManagedS3 :: Maybe CustomerManagedDatastoreS3StorageSummary
$sel:serviceManagedS3:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe ServiceManagedDatastoreS3StorageSummary
$sel:iotSiteWiseMultiLayerStorage:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
$sel:customerManagedS3:DatastoreStorageSummary' :: DatastoreStorageSummary
-> Maybe CustomerManagedDatastoreS3StorageSummary
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomerManagedDatastoreS3StorageSummary
customerManagedS3
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DatastoreIotSiteWiseMultiLayerStorageSummary
iotSiteWiseMultiLayerStorage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceManagedDatastoreS3StorageSummary
serviceManagedS3