{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.IoTSiteWise.PutStorageConfiguration
-- 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)
--
-- Configures storage settings for IoT SiteWise.
module Amazonka.IoTSiteWise.PutStorageConfiguration
  ( -- * Creating a Request
    PutStorageConfiguration (..),
    newPutStorageConfiguration,

    -- * Request Lenses
    putStorageConfiguration_multiLayerStorage,
    putStorageConfiguration_storageType,

    -- * Destructuring the Response
    PutStorageConfigurationResponse (..),
    newPutStorageConfigurationResponse,

    -- * Response Lenses
    putStorageConfigurationResponse_multiLayerStorage,
    putStorageConfigurationResponse_httpStatus,
    putStorageConfigurationResponse_storageType,
    putStorageConfigurationResponse_configurationStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newPutStorageConfiguration' smart constructor.
data PutStorageConfiguration = PutStorageConfiguration'
  { -- | Identifies a storage destination. If you specified @MULTI_LAYER_STORAGE@
    -- for the storage type, you must specify a @MultiLayerStorage@ object.
    PutStorageConfiguration -> Maybe MultiLayerStorage
multiLayerStorage :: Prelude.Maybe MultiLayerStorage,
    -- | The type of storage that you specified for your data. The storage type
    -- can be one of the following values:
    --
    -- -   @SITEWISE_DEFAULT_STORAGE@ – IoT SiteWise replicates your data into
    --     a service managed database.
    --
    -- -   @MULTI_LAYER_STORAGE@ – IoT SiteWise replicates your data into a
    --     service managed database and saves a copy of your raw data and
    --     metadata in an Amazon S3 object that you specified.
    PutStorageConfiguration -> StorageType
storageType :: StorageType
  }
  deriving (PutStorageConfiguration -> PutStorageConfiguration -> Bool
(PutStorageConfiguration -> PutStorageConfiguration -> Bool)
-> (PutStorageConfiguration -> PutStorageConfiguration -> Bool)
-> Eq PutStorageConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutStorageConfiguration -> PutStorageConfiguration -> Bool
$c/= :: PutStorageConfiguration -> PutStorageConfiguration -> Bool
== :: PutStorageConfiguration -> PutStorageConfiguration -> Bool
$c== :: PutStorageConfiguration -> PutStorageConfiguration -> Bool
Prelude.Eq, ReadPrec [PutStorageConfiguration]
ReadPrec PutStorageConfiguration
Int -> ReadS PutStorageConfiguration
ReadS [PutStorageConfiguration]
(Int -> ReadS PutStorageConfiguration)
-> ReadS [PutStorageConfiguration]
-> ReadPrec PutStorageConfiguration
-> ReadPrec [PutStorageConfiguration]
-> Read PutStorageConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutStorageConfiguration]
$creadListPrec :: ReadPrec [PutStorageConfiguration]
readPrec :: ReadPrec PutStorageConfiguration
$creadPrec :: ReadPrec PutStorageConfiguration
readList :: ReadS [PutStorageConfiguration]
$creadList :: ReadS [PutStorageConfiguration]
readsPrec :: Int -> ReadS PutStorageConfiguration
$creadsPrec :: Int -> ReadS PutStorageConfiguration
Prelude.Read, Int -> PutStorageConfiguration -> ShowS
[PutStorageConfiguration] -> ShowS
PutStorageConfiguration -> String
(Int -> PutStorageConfiguration -> ShowS)
-> (PutStorageConfiguration -> String)
-> ([PutStorageConfiguration] -> ShowS)
-> Show PutStorageConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutStorageConfiguration] -> ShowS
$cshowList :: [PutStorageConfiguration] -> ShowS
show :: PutStorageConfiguration -> String
$cshow :: PutStorageConfiguration -> String
showsPrec :: Int -> PutStorageConfiguration -> ShowS
$cshowsPrec :: Int -> PutStorageConfiguration -> ShowS
Prelude.Show, (forall x.
 PutStorageConfiguration -> Rep PutStorageConfiguration x)
-> (forall x.
    Rep PutStorageConfiguration x -> PutStorageConfiguration)
-> Generic PutStorageConfiguration
forall x. Rep PutStorageConfiguration x -> PutStorageConfiguration
forall x. PutStorageConfiguration -> Rep PutStorageConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutStorageConfiguration x -> PutStorageConfiguration
$cfrom :: forall x. PutStorageConfiguration -> Rep PutStorageConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'PutStorageConfiguration' 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:
--
-- 'multiLayerStorage', 'putStorageConfiguration_multiLayerStorage' - Identifies a storage destination. If you specified @MULTI_LAYER_STORAGE@
-- for the storage type, you must specify a @MultiLayerStorage@ object.
--
-- 'storageType', 'putStorageConfiguration_storageType' - The type of storage that you specified for your data. The storage type
-- can be one of the following values:
--
-- -   @SITEWISE_DEFAULT_STORAGE@ – IoT SiteWise replicates your data into
--     a service managed database.
--
-- -   @MULTI_LAYER_STORAGE@ – IoT SiteWise replicates your data into a
--     service managed database and saves a copy of your raw data and
--     metadata in an Amazon S3 object that you specified.
newPutStorageConfiguration ::
  -- | 'storageType'
  StorageType ->
  PutStorageConfiguration
newPutStorageConfiguration :: StorageType -> PutStorageConfiguration
newPutStorageConfiguration StorageType
pStorageType_ =
  PutStorageConfiguration' :: Maybe MultiLayerStorage -> StorageType -> PutStorageConfiguration
PutStorageConfiguration'
    { $sel:multiLayerStorage:PutStorageConfiguration' :: Maybe MultiLayerStorage
multiLayerStorage =
        Maybe MultiLayerStorage
forall a. Maybe a
Prelude.Nothing,
      $sel:storageType:PutStorageConfiguration' :: StorageType
storageType = StorageType
pStorageType_
    }

-- | Identifies a storage destination. If you specified @MULTI_LAYER_STORAGE@
-- for the storage type, you must specify a @MultiLayerStorage@ object.
putStorageConfiguration_multiLayerStorage :: Lens.Lens' PutStorageConfiguration (Prelude.Maybe MultiLayerStorage)
putStorageConfiguration_multiLayerStorage :: (Maybe MultiLayerStorage -> f (Maybe MultiLayerStorage))
-> PutStorageConfiguration -> f PutStorageConfiguration
putStorageConfiguration_multiLayerStorage = (PutStorageConfiguration -> Maybe MultiLayerStorage)
-> (PutStorageConfiguration
    -> Maybe MultiLayerStorage -> PutStorageConfiguration)
-> Lens
     PutStorageConfiguration
     PutStorageConfiguration
     (Maybe MultiLayerStorage)
     (Maybe MultiLayerStorage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutStorageConfiguration' {Maybe MultiLayerStorage
multiLayerStorage :: Maybe MultiLayerStorage
$sel:multiLayerStorage:PutStorageConfiguration' :: PutStorageConfiguration -> Maybe MultiLayerStorage
multiLayerStorage} -> Maybe MultiLayerStorage
multiLayerStorage) (\s :: PutStorageConfiguration
s@PutStorageConfiguration' {} Maybe MultiLayerStorage
a -> PutStorageConfiguration
s {$sel:multiLayerStorage:PutStorageConfiguration' :: Maybe MultiLayerStorage
multiLayerStorage = Maybe MultiLayerStorage
a} :: PutStorageConfiguration)

-- | The type of storage that you specified for your data. The storage type
-- can be one of the following values:
--
-- -   @SITEWISE_DEFAULT_STORAGE@ – IoT SiteWise replicates your data into
--     a service managed database.
--
-- -   @MULTI_LAYER_STORAGE@ – IoT SiteWise replicates your data into a
--     service managed database and saves a copy of your raw data and
--     metadata in an Amazon S3 object that you specified.
putStorageConfiguration_storageType :: Lens.Lens' PutStorageConfiguration StorageType
putStorageConfiguration_storageType :: (StorageType -> f StorageType)
-> PutStorageConfiguration -> f PutStorageConfiguration
putStorageConfiguration_storageType = (PutStorageConfiguration -> StorageType)
-> (PutStorageConfiguration
    -> StorageType -> PutStorageConfiguration)
-> Lens
     PutStorageConfiguration
     PutStorageConfiguration
     StorageType
     StorageType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutStorageConfiguration' {StorageType
storageType :: StorageType
$sel:storageType:PutStorageConfiguration' :: PutStorageConfiguration -> StorageType
storageType} -> StorageType
storageType) (\s :: PutStorageConfiguration
s@PutStorageConfiguration' {} StorageType
a -> PutStorageConfiguration
s {$sel:storageType:PutStorageConfiguration' :: StorageType
storageType = StorageType
a} :: PutStorageConfiguration)

instance Core.AWSRequest PutStorageConfiguration where
  type
    AWSResponse PutStorageConfiguration =
      PutStorageConfigurationResponse
  request :: PutStorageConfiguration -> Request PutStorageConfiguration
request = Service
-> PutStorageConfiguration -> Request PutStorageConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutStorageConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutStorageConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse PutStorageConfiguration))
-> Logger
-> Service
-> Proxy PutStorageConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutStorageConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe MultiLayerStorage
-> Int
-> StorageType
-> ConfigurationStatus
-> PutStorageConfigurationResponse
PutStorageConfigurationResponse'
            (Maybe MultiLayerStorage
 -> Int
 -> StorageType
 -> ConfigurationStatus
 -> PutStorageConfigurationResponse)
-> Either String (Maybe MultiLayerStorage)
-> Either
     String
     (Int
      -> StorageType
      -> ConfigurationStatus
      -> PutStorageConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Key -> Either String (Maybe MultiLayerStorage)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"multiLayerStorage")
            Either
  String
  (Int
   -> StorageType
   -> ConfigurationStatus
   -> PutStorageConfigurationResponse)
-> Either String Int
-> Either
     String
     (StorageType
      -> ConfigurationStatus -> PutStorageConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  (StorageType
   -> ConfigurationStatus -> PutStorageConfigurationResponse)
-> Either String StorageType
-> Either
     String (ConfigurationStatus -> PutStorageConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Key -> Either String StorageType
forall a. FromJSON a => Object -> Key -> Either String a
Core..:> Key
"storageType")
            Either
  String (ConfigurationStatus -> PutStorageConfigurationResponse)
-> Either String ConfigurationStatus
-> Either String PutStorageConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Key -> Either String ConfigurationStatus
forall a. FromJSON a => Object -> Key -> Either String a
Core..:> Key
"configurationStatus")
      )

instance Prelude.Hashable PutStorageConfiguration

instance Prelude.NFData PutStorageConfiguration

instance Core.ToHeaders PutStorageConfiguration where
  toHeaders :: PutStorageConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutStorageConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON PutStorageConfiguration where
  toJSON :: PutStorageConfiguration -> Value
toJSON PutStorageConfiguration' {Maybe MultiLayerStorage
StorageType
storageType :: StorageType
multiLayerStorage :: Maybe MultiLayerStorage
$sel:storageType:PutStorageConfiguration' :: PutStorageConfiguration -> StorageType
$sel:multiLayerStorage:PutStorageConfiguration' :: PutStorageConfiguration -> Maybe MultiLayerStorage
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"multiLayerStorage" Key -> MultiLayerStorage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..=)
              (MultiLayerStorage -> Pair)
-> Maybe MultiLayerStorage -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MultiLayerStorage
multiLayerStorage,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Key
"storageType" Key -> StorageType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= StorageType
storageType)
          ]
      )

instance Core.ToPath PutStorageConfiguration where
  toPath :: PutStorageConfiguration -> ByteString
toPath =
    ByteString -> PutStorageConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/configuration/account/storage"

instance Core.ToQuery PutStorageConfiguration where
  toQuery :: PutStorageConfiguration -> QueryString
toQuery = QueryString -> PutStorageConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newPutStorageConfigurationResponse' smart constructor.
data PutStorageConfigurationResponse = PutStorageConfigurationResponse'
  { -- | Contains information about the storage destination.
    PutStorageConfigurationResponse -> Maybe MultiLayerStorage
multiLayerStorage :: Prelude.Maybe MultiLayerStorage,
    -- | The response's http status code.
    PutStorageConfigurationResponse -> Int
httpStatus :: Prelude.Int,
    -- | The type of storage that you specified for your data. The storage type
    -- can be one of the following values:
    --
    -- -   @SITEWISE_DEFAULT_STORAGE@ – IoT SiteWise replicates your data into
    --     a service managed database.
    --
    -- -   @MULTI_LAYER_STORAGE@ – IoT SiteWise replicates your data into a
    --     service managed database and saves a copy of your raw data and
    --     metadata in an Amazon S3 object that you specified.
    PutStorageConfigurationResponse -> StorageType
storageType :: StorageType,
    PutStorageConfigurationResponse -> ConfigurationStatus
configurationStatus :: ConfigurationStatus
  }
  deriving (PutStorageConfigurationResponse
-> PutStorageConfigurationResponse -> Bool
(PutStorageConfigurationResponse
 -> PutStorageConfigurationResponse -> Bool)
-> (PutStorageConfigurationResponse
    -> PutStorageConfigurationResponse -> Bool)
-> Eq PutStorageConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutStorageConfigurationResponse
-> PutStorageConfigurationResponse -> Bool
$c/= :: PutStorageConfigurationResponse
-> PutStorageConfigurationResponse -> Bool
== :: PutStorageConfigurationResponse
-> PutStorageConfigurationResponse -> Bool
$c== :: PutStorageConfigurationResponse
-> PutStorageConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [PutStorageConfigurationResponse]
ReadPrec PutStorageConfigurationResponse
Int -> ReadS PutStorageConfigurationResponse
ReadS [PutStorageConfigurationResponse]
(Int -> ReadS PutStorageConfigurationResponse)
-> ReadS [PutStorageConfigurationResponse]
-> ReadPrec PutStorageConfigurationResponse
-> ReadPrec [PutStorageConfigurationResponse]
-> Read PutStorageConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutStorageConfigurationResponse]
$creadListPrec :: ReadPrec [PutStorageConfigurationResponse]
readPrec :: ReadPrec PutStorageConfigurationResponse
$creadPrec :: ReadPrec PutStorageConfigurationResponse
readList :: ReadS [PutStorageConfigurationResponse]
$creadList :: ReadS [PutStorageConfigurationResponse]
readsPrec :: Int -> ReadS PutStorageConfigurationResponse
$creadsPrec :: Int -> ReadS PutStorageConfigurationResponse
Prelude.Read, Int -> PutStorageConfigurationResponse -> ShowS
[PutStorageConfigurationResponse] -> ShowS
PutStorageConfigurationResponse -> String
(Int -> PutStorageConfigurationResponse -> ShowS)
-> (PutStorageConfigurationResponse -> String)
-> ([PutStorageConfigurationResponse] -> ShowS)
-> Show PutStorageConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutStorageConfigurationResponse] -> ShowS
$cshowList :: [PutStorageConfigurationResponse] -> ShowS
show :: PutStorageConfigurationResponse -> String
$cshow :: PutStorageConfigurationResponse -> String
showsPrec :: Int -> PutStorageConfigurationResponse -> ShowS
$cshowsPrec :: Int -> PutStorageConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 PutStorageConfigurationResponse
 -> Rep PutStorageConfigurationResponse x)
-> (forall x.
    Rep PutStorageConfigurationResponse x
    -> PutStorageConfigurationResponse)
-> Generic PutStorageConfigurationResponse
forall x.
Rep PutStorageConfigurationResponse x
-> PutStorageConfigurationResponse
forall x.
PutStorageConfigurationResponse
-> Rep PutStorageConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutStorageConfigurationResponse x
-> PutStorageConfigurationResponse
$cfrom :: forall x.
PutStorageConfigurationResponse
-> Rep PutStorageConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'PutStorageConfigurationResponse' 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:
--
-- 'multiLayerStorage', 'putStorageConfigurationResponse_multiLayerStorage' - Contains information about the storage destination.
--
-- 'httpStatus', 'putStorageConfigurationResponse_httpStatus' - The response's http status code.
--
-- 'storageType', 'putStorageConfigurationResponse_storageType' - The type of storage that you specified for your data. The storage type
-- can be one of the following values:
--
-- -   @SITEWISE_DEFAULT_STORAGE@ – IoT SiteWise replicates your data into
--     a service managed database.
--
-- -   @MULTI_LAYER_STORAGE@ – IoT SiteWise replicates your data into a
--     service managed database and saves a copy of your raw data and
--     metadata in an Amazon S3 object that you specified.
--
-- 'configurationStatus', 'putStorageConfigurationResponse_configurationStatus' - Undocumented member.
newPutStorageConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'storageType'
  StorageType ->
  -- | 'configurationStatus'
  ConfigurationStatus ->
  PutStorageConfigurationResponse
newPutStorageConfigurationResponse :: Int
-> StorageType
-> ConfigurationStatus
-> PutStorageConfigurationResponse
newPutStorageConfigurationResponse
  Int
pHttpStatus_
  StorageType
pStorageType_
  ConfigurationStatus
pConfigurationStatus_ =
    PutStorageConfigurationResponse' :: Maybe MultiLayerStorage
-> Int
-> StorageType
-> ConfigurationStatus
-> PutStorageConfigurationResponse
PutStorageConfigurationResponse'
      { $sel:multiLayerStorage:PutStorageConfigurationResponse' :: Maybe MultiLayerStorage
multiLayerStorage =
          Maybe MultiLayerStorage
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:PutStorageConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:storageType:PutStorageConfigurationResponse' :: StorageType
storageType = StorageType
pStorageType_,
        $sel:configurationStatus:PutStorageConfigurationResponse' :: ConfigurationStatus
configurationStatus =
          ConfigurationStatus
pConfigurationStatus_
      }

-- | Contains information about the storage destination.
putStorageConfigurationResponse_multiLayerStorage :: Lens.Lens' PutStorageConfigurationResponse (Prelude.Maybe MultiLayerStorage)
putStorageConfigurationResponse_multiLayerStorage :: (Maybe MultiLayerStorage -> f (Maybe MultiLayerStorage))
-> PutStorageConfigurationResponse
-> f PutStorageConfigurationResponse
putStorageConfigurationResponse_multiLayerStorage = (PutStorageConfigurationResponse -> Maybe MultiLayerStorage)
-> (PutStorageConfigurationResponse
    -> Maybe MultiLayerStorage -> PutStorageConfigurationResponse)
-> Lens
     PutStorageConfigurationResponse
     PutStorageConfigurationResponse
     (Maybe MultiLayerStorage)
     (Maybe MultiLayerStorage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutStorageConfigurationResponse' {Maybe MultiLayerStorage
multiLayerStorage :: Maybe MultiLayerStorage
$sel:multiLayerStorage:PutStorageConfigurationResponse' :: PutStorageConfigurationResponse -> Maybe MultiLayerStorage
multiLayerStorage} -> Maybe MultiLayerStorage
multiLayerStorage) (\s :: PutStorageConfigurationResponse
s@PutStorageConfigurationResponse' {} Maybe MultiLayerStorage
a -> PutStorageConfigurationResponse
s {$sel:multiLayerStorage:PutStorageConfigurationResponse' :: Maybe MultiLayerStorage
multiLayerStorage = Maybe MultiLayerStorage
a} :: PutStorageConfigurationResponse)

-- | The response's http status code.
putStorageConfigurationResponse_httpStatus :: Lens.Lens' PutStorageConfigurationResponse Prelude.Int
putStorageConfigurationResponse_httpStatus :: (Int -> f Int)
-> PutStorageConfigurationResponse
-> f PutStorageConfigurationResponse
putStorageConfigurationResponse_httpStatus = (PutStorageConfigurationResponse -> Int)
-> (PutStorageConfigurationResponse
    -> Int -> PutStorageConfigurationResponse)
-> Lens
     PutStorageConfigurationResponse
     PutStorageConfigurationResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutStorageConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutStorageConfigurationResponse' :: PutStorageConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutStorageConfigurationResponse
s@PutStorageConfigurationResponse' {} Int
a -> PutStorageConfigurationResponse
s {$sel:httpStatus:PutStorageConfigurationResponse' :: Int
httpStatus = Int
a} :: PutStorageConfigurationResponse)

-- | The type of storage that you specified for your data. The storage type
-- can be one of the following values:
--
-- -   @SITEWISE_DEFAULT_STORAGE@ – IoT SiteWise replicates your data into
--     a service managed database.
--
-- -   @MULTI_LAYER_STORAGE@ – IoT SiteWise replicates your data into a
--     service managed database and saves a copy of your raw data and
--     metadata in an Amazon S3 object that you specified.
putStorageConfigurationResponse_storageType :: Lens.Lens' PutStorageConfigurationResponse StorageType
putStorageConfigurationResponse_storageType :: (StorageType -> f StorageType)
-> PutStorageConfigurationResponse
-> f PutStorageConfigurationResponse
putStorageConfigurationResponse_storageType = (PutStorageConfigurationResponse -> StorageType)
-> (PutStorageConfigurationResponse
    -> StorageType -> PutStorageConfigurationResponse)
-> Lens
     PutStorageConfigurationResponse
     PutStorageConfigurationResponse
     StorageType
     StorageType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutStorageConfigurationResponse' {StorageType
storageType :: StorageType
$sel:storageType:PutStorageConfigurationResponse' :: PutStorageConfigurationResponse -> StorageType
storageType} -> StorageType
storageType) (\s :: PutStorageConfigurationResponse
s@PutStorageConfigurationResponse' {} StorageType
a -> PutStorageConfigurationResponse
s {$sel:storageType:PutStorageConfigurationResponse' :: StorageType
storageType = StorageType
a} :: PutStorageConfigurationResponse)

-- | Undocumented member.
putStorageConfigurationResponse_configurationStatus :: Lens.Lens' PutStorageConfigurationResponse ConfigurationStatus
putStorageConfigurationResponse_configurationStatus :: (ConfigurationStatus -> f ConfigurationStatus)
-> PutStorageConfigurationResponse
-> f PutStorageConfigurationResponse
putStorageConfigurationResponse_configurationStatus = (PutStorageConfigurationResponse -> ConfigurationStatus)
-> (PutStorageConfigurationResponse
    -> ConfigurationStatus -> PutStorageConfigurationResponse)
-> Lens
     PutStorageConfigurationResponse
     PutStorageConfigurationResponse
     ConfigurationStatus
     ConfigurationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutStorageConfigurationResponse' {ConfigurationStatus
configurationStatus :: ConfigurationStatus
$sel:configurationStatus:PutStorageConfigurationResponse' :: PutStorageConfigurationResponse -> ConfigurationStatus
configurationStatus} -> ConfigurationStatus
configurationStatus) (\s :: PutStorageConfigurationResponse
s@PutStorageConfigurationResponse' {} ConfigurationStatus
a -> PutStorageConfigurationResponse
s {$sel:configurationStatus:PutStorageConfigurationResponse' :: ConfigurationStatus
configurationStatus = ConfigurationStatus
a} :: PutStorageConfigurationResponse)

instance
  Prelude.NFData
    PutStorageConfigurationResponse