{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTAnalytics.Types.DatastoreIotSiteWiseMultiLayerStorageSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTAnalytics.Types.DatastoreIotSiteWiseMultiLayerStorageSummary where

import qualified Amazonka.Core as Core
import Amazonka.IoTAnalytics.Types.IotSiteWiseCustomerManagedDatastoreS3StorageSummary
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains information about the data store that you manage, which stores
-- data used by IoT SiteWise.
--
-- /See:/ 'newDatastoreIotSiteWiseMultiLayerStorageSummary' smart constructor.
data DatastoreIotSiteWiseMultiLayerStorageSummary = DatastoreIotSiteWiseMultiLayerStorageSummary'
  { -- | Used to store data used by IoT SiteWise in an Amazon S3 bucket that you
    -- manage.
    DatastoreIotSiteWiseMultiLayerStorageSummary
-> Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
customerManagedS3Storage :: Prelude.Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
  }
  deriving (DatastoreIotSiteWiseMultiLayerStorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool
(DatastoreIotSiteWiseMultiLayerStorageSummary
 -> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool)
-> (DatastoreIotSiteWiseMultiLayerStorageSummary
    -> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool)
-> Eq DatastoreIotSiteWiseMultiLayerStorageSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatastoreIotSiteWiseMultiLayerStorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool
$c/= :: DatastoreIotSiteWiseMultiLayerStorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool
== :: DatastoreIotSiteWiseMultiLayerStorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool
$c== :: DatastoreIotSiteWiseMultiLayerStorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary -> Bool
Prelude.Eq, ReadPrec [DatastoreIotSiteWiseMultiLayerStorageSummary]
ReadPrec DatastoreIotSiteWiseMultiLayerStorageSummary
Int -> ReadS DatastoreIotSiteWiseMultiLayerStorageSummary
ReadS [DatastoreIotSiteWiseMultiLayerStorageSummary]
(Int -> ReadS DatastoreIotSiteWiseMultiLayerStorageSummary)
-> ReadS [DatastoreIotSiteWiseMultiLayerStorageSummary]
-> ReadPrec DatastoreIotSiteWiseMultiLayerStorageSummary
-> ReadPrec [DatastoreIotSiteWiseMultiLayerStorageSummary]
-> Read DatastoreIotSiteWiseMultiLayerStorageSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatastoreIotSiteWiseMultiLayerStorageSummary]
$creadListPrec :: ReadPrec [DatastoreIotSiteWiseMultiLayerStorageSummary]
readPrec :: ReadPrec DatastoreIotSiteWiseMultiLayerStorageSummary
$creadPrec :: ReadPrec DatastoreIotSiteWiseMultiLayerStorageSummary
readList :: ReadS [DatastoreIotSiteWiseMultiLayerStorageSummary]
$creadList :: ReadS [DatastoreIotSiteWiseMultiLayerStorageSummary]
readsPrec :: Int -> ReadS DatastoreIotSiteWiseMultiLayerStorageSummary
$creadsPrec :: Int -> ReadS DatastoreIotSiteWiseMultiLayerStorageSummary
Prelude.Read, Int -> DatastoreIotSiteWiseMultiLayerStorageSummary -> ShowS
[DatastoreIotSiteWiseMultiLayerStorageSummary] -> ShowS
DatastoreIotSiteWiseMultiLayerStorageSummary -> String
(Int -> DatastoreIotSiteWiseMultiLayerStorageSummary -> ShowS)
-> (DatastoreIotSiteWiseMultiLayerStorageSummary -> String)
-> ([DatastoreIotSiteWiseMultiLayerStorageSummary] -> ShowS)
-> Show DatastoreIotSiteWiseMultiLayerStorageSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatastoreIotSiteWiseMultiLayerStorageSummary] -> ShowS
$cshowList :: [DatastoreIotSiteWiseMultiLayerStorageSummary] -> ShowS
show :: DatastoreIotSiteWiseMultiLayerStorageSummary -> String
$cshow :: DatastoreIotSiteWiseMultiLayerStorageSummary -> String
showsPrec :: Int -> DatastoreIotSiteWiseMultiLayerStorageSummary -> ShowS
$cshowsPrec :: Int -> DatastoreIotSiteWiseMultiLayerStorageSummary -> ShowS
Prelude.Show, (forall x.
 DatastoreIotSiteWiseMultiLayerStorageSummary
 -> Rep DatastoreIotSiteWiseMultiLayerStorageSummary x)
-> (forall x.
    Rep DatastoreIotSiteWiseMultiLayerStorageSummary x
    -> DatastoreIotSiteWiseMultiLayerStorageSummary)
-> Generic DatastoreIotSiteWiseMultiLayerStorageSummary
forall x.
Rep DatastoreIotSiteWiseMultiLayerStorageSummary x
-> DatastoreIotSiteWiseMultiLayerStorageSummary
forall x.
DatastoreIotSiteWiseMultiLayerStorageSummary
-> Rep DatastoreIotSiteWiseMultiLayerStorageSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DatastoreIotSiteWiseMultiLayerStorageSummary x
-> DatastoreIotSiteWiseMultiLayerStorageSummary
$cfrom :: forall x.
DatastoreIotSiteWiseMultiLayerStorageSummary
-> Rep DatastoreIotSiteWiseMultiLayerStorageSummary x
Prelude.Generic)

-- |
-- Create a value of 'DatastoreIotSiteWiseMultiLayerStorageSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'customerManagedS3Storage', 'datastoreIotSiteWiseMultiLayerStorageSummary_customerManagedS3Storage' - Used to store data used by IoT SiteWise in an Amazon S3 bucket that you
-- manage.
newDatastoreIotSiteWiseMultiLayerStorageSummary ::
  DatastoreIotSiteWiseMultiLayerStorageSummary
newDatastoreIotSiteWiseMultiLayerStorageSummary :: DatastoreIotSiteWiseMultiLayerStorageSummary
newDatastoreIotSiteWiseMultiLayerStorageSummary =
  DatastoreIotSiteWiseMultiLayerStorageSummary' :: Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary
DatastoreIotSiteWiseMultiLayerStorageSummary'
    { $sel:customerManagedS3Storage:DatastoreIotSiteWiseMultiLayerStorageSummary' :: Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
customerManagedS3Storage =
        Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
forall a. Maybe a
Prelude.Nothing
    }

-- | Used to store data used by IoT SiteWise in an Amazon S3 bucket that you
-- manage.
datastoreIotSiteWiseMultiLayerStorageSummary_customerManagedS3Storage :: Lens.Lens' DatastoreIotSiteWiseMultiLayerStorageSummary (Prelude.Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary)
datastoreIotSiteWiseMultiLayerStorageSummary_customerManagedS3Storage :: (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
 -> f (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary))
-> DatastoreIotSiteWiseMultiLayerStorageSummary
-> f DatastoreIotSiteWiseMultiLayerStorageSummary
datastoreIotSiteWiseMultiLayerStorageSummary_customerManagedS3Storage = (DatastoreIotSiteWiseMultiLayerStorageSummary
 -> Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary)
-> (DatastoreIotSiteWiseMultiLayerStorageSummary
    -> Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
    -> DatastoreIotSiteWiseMultiLayerStorageSummary)
-> Lens
     DatastoreIotSiteWiseMultiLayerStorageSummary
     DatastoreIotSiteWiseMultiLayerStorageSummary
     (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary)
     (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatastoreIotSiteWiseMultiLayerStorageSummary' {Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
customerManagedS3Storage :: Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
$sel:customerManagedS3Storage:DatastoreIotSiteWiseMultiLayerStorageSummary' :: DatastoreIotSiteWiseMultiLayerStorageSummary
-> Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
customerManagedS3Storage} -> Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
customerManagedS3Storage) (\s :: DatastoreIotSiteWiseMultiLayerStorageSummary
s@DatastoreIotSiteWiseMultiLayerStorageSummary' {} Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
a -> DatastoreIotSiteWiseMultiLayerStorageSummary
s {$sel:customerManagedS3Storage:DatastoreIotSiteWiseMultiLayerStorageSummary' :: Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
customerManagedS3Storage = Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
a} :: DatastoreIotSiteWiseMultiLayerStorageSummary)

instance
  Core.FromJSON
    DatastoreIotSiteWiseMultiLayerStorageSummary
  where
  parseJSON :: Value -> Parser DatastoreIotSiteWiseMultiLayerStorageSummary
parseJSON =
    String
-> (Object -> Parser DatastoreIotSiteWiseMultiLayerStorageSummary)
-> Value
-> Parser DatastoreIotSiteWiseMultiLayerStorageSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DatastoreIotSiteWiseMultiLayerStorageSummary"
      ( \Object
x ->
          Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
-> DatastoreIotSiteWiseMultiLayerStorageSummary
DatastoreIotSiteWiseMultiLayerStorageSummary'
            (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary
 -> DatastoreIotSiteWiseMultiLayerStorageSummary)
-> Parser
     (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary)
-> Parser DatastoreIotSiteWiseMultiLayerStorageSummary
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Parser
     (Maybe IotSiteWiseCustomerManagedDatastoreS3StorageSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customerManagedS3Storage")
      )

instance
  Prelude.Hashable
    DatastoreIotSiteWiseMultiLayerStorageSummary

instance
  Prelude.NFData
    DatastoreIotSiteWiseMultiLayerStorageSummary