{-# 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.IoTSiteWise.Types.MultiLayerStorage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTSiteWise.Types.CustomerManagedS3Storage
import qualified Amazonka.Prelude as Prelude
data MultiLayerStorage = MultiLayerStorage'
{
MultiLayerStorage -> CustomerManagedS3Storage
customerManagedS3Storage :: CustomerManagedS3Storage
}
deriving (MultiLayerStorage -> MultiLayerStorage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiLayerStorage -> MultiLayerStorage -> Bool
$c/= :: MultiLayerStorage -> MultiLayerStorage -> Bool
== :: MultiLayerStorage -> MultiLayerStorage -> Bool
$c== :: MultiLayerStorage -> MultiLayerStorage -> Bool
Prelude.Eq, ReadPrec [MultiLayerStorage]
ReadPrec MultiLayerStorage
Int -> ReadS MultiLayerStorage
ReadS [MultiLayerStorage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiLayerStorage]
$creadListPrec :: ReadPrec [MultiLayerStorage]
readPrec :: ReadPrec MultiLayerStorage
$creadPrec :: ReadPrec MultiLayerStorage
readList :: ReadS [MultiLayerStorage]
$creadList :: ReadS [MultiLayerStorage]
readsPrec :: Int -> ReadS MultiLayerStorage
$creadsPrec :: Int -> ReadS MultiLayerStorage
Prelude.Read, Int -> MultiLayerStorage -> ShowS
[MultiLayerStorage] -> ShowS
MultiLayerStorage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiLayerStorage] -> ShowS
$cshowList :: [MultiLayerStorage] -> ShowS
show :: MultiLayerStorage -> String
$cshow :: MultiLayerStorage -> String
showsPrec :: Int -> MultiLayerStorage -> ShowS
$cshowsPrec :: Int -> MultiLayerStorage -> ShowS
Prelude.Show, forall x. Rep MultiLayerStorage x -> MultiLayerStorage
forall x. MultiLayerStorage -> Rep MultiLayerStorage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MultiLayerStorage x -> MultiLayerStorage
$cfrom :: forall x. MultiLayerStorage -> Rep MultiLayerStorage x
Prelude.Generic)
newMultiLayerStorage ::
CustomerManagedS3Storage ->
MultiLayerStorage
newMultiLayerStorage :: CustomerManagedS3Storage -> MultiLayerStorage
newMultiLayerStorage CustomerManagedS3Storage
pCustomerManagedS3Storage_ =
MultiLayerStorage'
{ $sel:customerManagedS3Storage:MultiLayerStorage' :: CustomerManagedS3Storage
customerManagedS3Storage =
CustomerManagedS3Storage
pCustomerManagedS3Storage_
}
multiLayerStorage_customerManagedS3Storage :: Lens.Lens' MultiLayerStorage CustomerManagedS3Storage
multiLayerStorage_customerManagedS3Storage :: Lens' MultiLayerStorage CustomerManagedS3Storage
multiLayerStorage_customerManagedS3Storage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiLayerStorage' {CustomerManagedS3Storage
customerManagedS3Storage :: CustomerManagedS3Storage
$sel:customerManagedS3Storage:MultiLayerStorage' :: MultiLayerStorage -> CustomerManagedS3Storage
customerManagedS3Storage} -> CustomerManagedS3Storage
customerManagedS3Storage) (\s :: MultiLayerStorage
s@MultiLayerStorage' {} CustomerManagedS3Storage
a -> MultiLayerStorage
s {$sel:customerManagedS3Storage:MultiLayerStorage' :: CustomerManagedS3Storage
customerManagedS3Storage = CustomerManagedS3Storage
a} :: MultiLayerStorage)
instance Data.FromJSON MultiLayerStorage where
parseJSON :: Value -> Parser MultiLayerStorage
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MultiLayerStorage"
( \Object
x ->
CustomerManagedS3Storage -> MultiLayerStorage
MultiLayerStorage'
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
"customerManagedS3Storage")
)
instance Prelude.Hashable MultiLayerStorage where
hashWithSalt :: Int -> MultiLayerStorage -> Int
hashWithSalt Int
_salt MultiLayerStorage' {CustomerManagedS3Storage
customerManagedS3Storage :: CustomerManagedS3Storage
$sel:customerManagedS3Storage:MultiLayerStorage' :: MultiLayerStorage -> CustomerManagedS3Storage
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` CustomerManagedS3Storage
customerManagedS3Storage
instance Prelude.NFData MultiLayerStorage where
rnf :: MultiLayerStorage -> ()
rnf MultiLayerStorage' {CustomerManagedS3Storage
customerManagedS3Storage :: CustomerManagedS3Storage
$sel:customerManagedS3Storage:MultiLayerStorage' :: MultiLayerStorage -> CustomerManagedS3Storage
..} =
forall a. NFData a => a -> ()
Prelude.rnf CustomerManagedS3Storage
customerManagedS3Storage
instance Data.ToJSON MultiLayerStorage where
toJSON :: MultiLayerStorage -> Value
toJSON MultiLayerStorage' {CustomerManagedS3Storage
customerManagedS3Storage :: CustomerManagedS3Storage
$sel:customerManagedS3Storage:MultiLayerStorage' :: MultiLayerStorage -> CustomerManagedS3Storage
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"customerManagedS3Storage"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= CustomerManagedS3Storage
customerManagedS3Storage
)
]
)