{-# 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.StorageGateway.DescribeWorkingStorage
-- 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)
--
-- Returns information about the working storage of a gateway. This
-- operation is only supported in the stored volumes gateway type. This
-- operation is deprecated in cached volumes API version (20120630). Use
-- DescribeUploadBuffer instead.
--
-- Working storage is also referred to as upload buffer. You can also use
-- the DescribeUploadBuffer operation to add upload buffer to a stored
-- volume gateway.
--
-- The response includes disk IDs that are configured as working storage,
-- and it includes the amount of working storage allocated and used.
module Amazonka.StorageGateway.DescribeWorkingStorage
  ( -- * Creating a Request
    DescribeWorkingStorage (..),
    newDescribeWorkingStorage,

    -- * Request Lenses
    describeWorkingStorage_gatewayARN,

    -- * Destructuring the Response
    DescribeWorkingStorageResponse (..),
    newDescribeWorkingStorageResponse,

    -- * Response Lenses
    describeWorkingStorageResponse_gatewayARN,
    describeWorkingStorageResponse_diskIds,
    describeWorkingStorageResponse_workingStorageAllocatedInBytes,
    describeWorkingStorageResponse_workingStorageUsedInBytes,
    describeWorkingStorageResponse_httpStatus,
  )
where

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

-- | A JSON object containing the Amazon Resource Name (ARN) of the gateway.
--
-- /See:/ 'newDescribeWorkingStorage' smart constructor.
data DescribeWorkingStorage = DescribeWorkingStorage'
  { DescribeWorkingStorage -> Text
gatewayARN :: Prelude.Text
  }
  deriving (DescribeWorkingStorage -> DescribeWorkingStorage -> Bool
(DescribeWorkingStorage -> DescribeWorkingStorage -> Bool)
-> (DescribeWorkingStorage -> DescribeWorkingStorage -> Bool)
-> Eq DescribeWorkingStorage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorkingStorage -> DescribeWorkingStorage -> Bool
$c/= :: DescribeWorkingStorage -> DescribeWorkingStorage -> Bool
== :: DescribeWorkingStorage -> DescribeWorkingStorage -> Bool
$c== :: DescribeWorkingStorage -> DescribeWorkingStorage -> Bool
Prelude.Eq, ReadPrec [DescribeWorkingStorage]
ReadPrec DescribeWorkingStorage
Int -> ReadS DescribeWorkingStorage
ReadS [DescribeWorkingStorage]
(Int -> ReadS DescribeWorkingStorage)
-> ReadS [DescribeWorkingStorage]
-> ReadPrec DescribeWorkingStorage
-> ReadPrec [DescribeWorkingStorage]
-> Read DescribeWorkingStorage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorkingStorage]
$creadListPrec :: ReadPrec [DescribeWorkingStorage]
readPrec :: ReadPrec DescribeWorkingStorage
$creadPrec :: ReadPrec DescribeWorkingStorage
readList :: ReadS [DescribeWorkingStorage]
$creadList :: ReadS [DescribeWorkingStorage]
readsPrec :: Int -> ReadS DescribeWorkingStorage
$creadsPrec :: Int -> ReadS DescribeWorkingStorage
Prelude.Read, Int -> DescribeWorkingStorage -> ShowS
[DescribeWorkingStorage] -> ShowS
DescribeWorkingStorage -> String
(Int -> DescribeWorkingStorage -> ShowS)
-> (DescribeWorkingStorage -> String)
-> ([DescribeWorkingStorage] -> ShowS)
-> Show DescribeWorkingStorage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorkingStorage] -> ShowS
$cshowList :: [DescribeWorkingStorage] -> ShowS
show :: DescribeWorkingStorage -> String
$cshow :: DescribeWorkingStorage -> String
showsPrec :: Int -> DescribeWorkingStorage -> ShowS
$cshowsPrec :: Int -> DescribeWorkingStorage -> ShowS
Prelude.Show, (forall x. DescribeWorkingStorage -> Rep DescribeWorkingStorage x)
-> (forall x.
    Rep DescribeWorkingStorage x -> DescribeWorkingStorage)
-> Generic DescribeWorkingStorage
forall x. Rep DescribeWorkingStorage x -> DescribeWorkingStorage
forall x. DescribeWorkingStorage -> Rep DescribeWorkingStorage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeWorkingStorage x -> DescribeWorkingStorage
$cfrom :: forall x. DescribeWorkingStorage -> Rep DescribeWorkingStorage x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorkingStorage' 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:
--
-- 'gatewayARN', 'describeWorkingStorage_gatewayARN' - Undocumented member.
newDescribeWorkingStorage ::
  -- | 'gatewayARN'
  Prelude.Text ->
  DescribeWorkingStorage
newDescribeWorkingStorage :: Text -> DescribeWorkingStorage
newDescribeWorkingStorage Text
pGatewayARN_ =
  DescribeWorkingStorage' :: Text -> DescribeWorkingStorage
DescribeWorkingStorage' {$sel:gatewayARN:DescribeWorkingStorage' :: Text
gatewayARN = Text
pGatewayARN_}

-- | Undocumented member.
describeWorkingStorage_gatewayARN :: Lens.Lens' DescribeWorkingStorage Prelude.Text
describeWorkingStorage_gatewayARN :: (Text -> f Text)
-> DescribeWorkingStorage -> f DescribeWorkingStorage
describeWorkingStorage_gatewayARN = (DescribeWorkingStorage -> Text)
-> (DescribeWorkingStorage -> Text -> DescribeWorkingStorage)
-> Lens DescribeWorkingStorage DescribeWorkingStorage Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkingStorage' {Text
gatewayARN :: Text
$sel:gatewayARN:DescribeWorkingStorage' :: DescribeWorkingStorage -> Text
gatewayARN} -> Text
gatewayARN) (\s :: DescribeWorkingStorage
s@DescribeWorkingStorage' {} Text
a -> DescribeWorkingStorage
s {$sel:gatewayARN:DescribeWorkingStorage' :: Text
gatewayARN = Text
a} :: DescribeWorkingStorage)

instance Core.AWSRequest DescribeWorkingStorage where
  type
    AWSResponse DescribeWorkingStorage =
      DescribeWorkingStorageResponse
  request :: DescribeWorkingStorage -> Request DescribeWorkingStorage
request = Service -> DescribeWorkingStorage -> Request DescribeWorkingStorage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeWorkingStorage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeWorkingStorage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeWorkingStorage))
-> Logger
-> Service
-> Proxy DescribeWorkingStorage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeWorkingStorage)))
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 Text
-> Maybe [Text]
-> Maybe Integer
-> Maybe Integer
-> Int
-> DescribeWorkingStorageResponse
DescribeWorkingStorageResponse'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe Integer
 -> Maybe Integer
 -> Int
 -> DescribeWorkingStorageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Integer
      -> Maybe Integer
      -> Int
      -> DescribeWorkingStorageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GatewayARN")
            Either
  String
  (Maybe [Text]
   -> Maybe Integer
   -> Maybe Integer
   -> Int
   -> DescribeWorkingStorageResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Integer
      -> Maybe Integer -> Int -> DescribeWorkingStorageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DiskIds" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Integer
   -> Maybe Integer -> Int -> DescribeWorkingStorageResponse)
-> Either String (Maybe Integer)
-> Either
     String (Maybe Integer -> Int -> DescribeWorkingStorageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WorkingStorageAllocatedInBytes")
            Either
  String (Maybe Integer -> Int -> DescribeWorkingStorageResponse)
-> Either String (Maybe Integer)
-> Either String (Int -> DescribeWorkingStorageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WorkingStorageUsedInBytes")
            Either String (Int -> DescribeWorkingStorageResponse)
-> Either String Int
-> Either String DescribeWorkingStorageResponse
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))
      )

instance Prelude.Hashable DescribeWorkingStorage

instance Prelude.NFData DescribeWorkingStorage

instance Core.ToHeaders DescribeWorkingStorage where
  toHeaders :: DescribeWorkingStorage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeWorkingStorage -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"StorageGateway_20130630.DescribeWorkingStorage" ::
                          Prelude.ByteString
                      ),
            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 DescribeWorkingStorage where
  toJSON :: DescribeWorkingStorage -> Value
toJSON DescribeWorkingStorage' {Text
gatewayARN :: Text
$sel:gatewayARN:DescribeWorkingStorage' :: DescribeWorkingStorage -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GatewayARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayARN)]
      )

instance Core.ToPath DescribeWorkingStorage where
  toPath :: DescribeWorkingStorage -> ByteString
toPath = ByteString -> DescribeWorkingStorage -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | A JSON object containing the following fields:
--
-- /See:/ 'newDescribeWorkingStorageResponse' smart constructor.
data DescribeWorkingStorageResponse = DescribeWorkingStorageResponse'
  { DescribeWorkingStorageResponse -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
    -- | An array of the gateway\'s local disk IDs that are configured as working
    -- storage. Each local disk ID is specified as a string (minimum length of
    -- 1 and maximum length of 300). If no local disks are configured as
    -- working storage, then the DiskIds array is empty.
    DescribeWorkingStorageResponse -> Maybe [Text]
diskIds :: Prelude.Maybe [Prelude.Text],
    -- | The total working storage in bytes allocated for the gateway. If no
    -- working storage is configured for the gateway, this field returns 0.
    DescribeWorkingStorageResponse -> Maybe Integer
workingStorageAllocatedInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The total working storage in bytes in use by the gateway. If no working
    -- storage is configured for the gateway, this field returns 0.
    DescribeWorkingStorageResponse -> Maybe Integer
workingStorageUsedInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    DescribeWorkingStorageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeWorkingStorageResponse
-> DescribeWorkingStorageResponse -> Bool
(DescribeWorkingStorageResponse
 -> DescribeWorkingStorageResponse -> Bool)
-> (DescribeWorkingStorageResponse
    -> DescribeWorkingStorageResponse -> Bool)
-> Eq DescribeWorkingStorageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorkingStorageResponse
-> DescribeWorkingStorageResponse -> Bool
$c/= :: DescribeWorkingStorageResponse
-> DescribeWorkingStorageResponse -> Bool
== :: DescribeWorkingStorageResponse
-> DescribeWorkingStorageResponse -> Bool
$c== :: DescribeWorkingStorageResponse
-> DescribeWorkingStorageResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWorkingStorageResponse]
ReadPrec DescribeWorkingStorageResponse
Int -> ReadS DescribeWorkingStorageResponse
ReadS [DescribeWorkingStorageResponse]
(Int -> ReadS DescribeWorkingStorageResponse)
-> ReadS [DescribeWorkingStorageResponse]
-> ReadPrec DescribeWorkingStorageResponse
-> ReadPrec [DescribeWorkingStorageResponse]
-> Read DescribeWorkingStorageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorkingStorageResponse]
$creadListPrec :: ReadPrec [DescribeWorkingStorageResponse]
readPrec :: ReadPrec DescribeWorkingStorageResponse
$creadPrec :: ReadPrec DescribeWorkingStorageResponse
readList :: ReadS [DescribeWorkingStorageResponse]
$creadList :: ReadS [DescribeWorkingStorageResponse]
readsPrec :: Int -> ReadS DescribeWorkingStorageResponse
$creadsPrec :: Int -> ReadS DescribeWorkingStorageResponse
Prelude.Read, Int -> DescribeWorkingStorageResponse -> ShowS
[DescribeWorkingStorageResponse] -> ShowS
DescribeWorkingStorageResponse -> String
(Int -> DescribeWorkingStorageResponse -> ShowS)
-> (DescribeWorkingStorageResponse -> String)
-> ([DescribeWorkingStorageResponse] -> ShowS)
-> Show DescribeWorkingStorageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorkingStorageResponse] -> ShowS
$cshowList :: [DescribeWorkingStorageResponse] -> ShowS
show :: DescribeWorkingStorageResponse -> String
$cshow :: DescribeWorkingStorageResponse -> String
showsPrec :: Int -> DescribeWorkingStorageResponse -> ShowS
$cshowsPrec :: Int -> DescribeWorkingStorageResponse -> ShowS
Prelude.Show, (forall x.
 DescribeWorkingStorageResponse
 -> Rep DescribeWorkingStorageResponse x)
-> (forall x.
    Rep DescribeWorkingStorageResponse x
    -> DescribeWorkingStorageResponse)
-> Generic DescribeWorkingStorageResponse
forall x.
Rep DescribeWorkingStorageResponse x
-> DescribeWorkingStorageResponse
forall x.
DescribeWorkingStorageResponse
-> Rep DescribeWorkingStorageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorkingStorageResponse x
-> DescribeWorkingStorageResponse
$cfrom :: forall x.
DescribeWorkingStorageResponse
-> Rep DescribeWorkingStorageResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorkingStorageResponse' 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:
--
-- 'gatewayARN', 'describeWorkingStorageResponse_gatewayARN' - Undocumented member.
--
-- 'diskIds', 'describeWorkingStorageResponse_diskIds' - An array of the gateway\'s local disk IDs that are configured as working
-- storage. Each local disk ID is specified as a string (minimum length of
-- 1 and maximum length of 300). If no local disks are configured as
-- working storage, then the DiskIds array is empty.
--
-- 'workingStorageAllocatedInBytes', 'describeWorkingStorageResponse_workingStorageAllocatedInBytes' - The total working storage in bytes allocated for the gateway. If no
-- working storage is configured for the gateway, this field returns 0.
--
-- 'workingStorageUsedInBytes', 'describeWorkingStorageResponse_workingStorageUsedInBytes' - The total working storage in bytes in use by the gateway. If no working
-- storage is configured for the gateway, this field returns 0.
--
-- 'httpStatus', 'describeWorkingStorageResponse_httpStatus' - The response's http status code.
newDescribeWorkingStorageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeWorkingStorageResponse
newDescribeWorkingStorageResponse :: Int -> DescribeWorkingStorageResponse
newDescribeWorkingStorageResponse Int
pHttpStatus_ =
  DescribeWorkingStorageResponse' :: Maybe Text
-> Maybe [Text]
-> Maybe Integer
-> Maybe Integer
-> Int
-> DescribeWorkingStorageResponse
DescribeWorkingStorageResponse'
    { $sel:gatewayARN:DescribeWorkingStorageResponse' :: Maybe Text
gatewayARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:diskIds:DescribeWorkingStorageResponse' :: Maybe [Text]
diskIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:workingStorageAllocatedInBytes:DescribeWorkingStorageResponse' :: Maybe Integer
workingStorageAllocatedInBytes =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:workingStorageUsedInBytes:DescribeWorkingStorageResponse' :: Maybe Integer
workingStorageUsedInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeWorkingStorageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
describeWorkingStorageResponse_gatewayARN :: Lens.Lens' DescribeWorkingStorageResponse (Prelude.Maybe Prelude.Text)
describeWorkingStorageResponse_gatewayARN :: (Maybe Text -> f (Maybe Text))
-> DescribeWorkingStorageResponse
-> f DescribeWorkingStorageResponse
describeWorkingStorageResponse_gatewayARN = (DescribeWorkingStorageResponse -> Maybe Text)
-> (DescribeWorkingStorageResponse
    -> Maybe Text -> DescribeWorkingStorageResponse)
-> Lens
     DescribeWorkingStorageResponse
     DescribeWorkingStorageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkingStorageResponse' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:DescribeWorkingStorageResponse' :: DescribeWorkingStorageResponse -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: DescribeWorkingStorageResponse
s@DescribeWorkingStorageResponse' {} Maybe Text
a -> DescribeWorkingStorageResponse
s {$sel:gatewayARN:DescribeWorkingStorageResponse' :: Maybe Text
gatewayARN = Maybe Text
a} :: DescribeWorkingStorageResponse)

-- | An array of the gateway\'s local disk IDs that are configured as working
-- storage. Each local disk ID is specified as a string (minimum length of
-- 1 and maximum length of 300). If no local disks are configured as
-- working storage, then the DiskIds array is empty.
describeWorkingStorageResponse_diskIds :: Lens.Lens' DescribeWorkingStorageResponse (Prelude.Maybe [Prelude.Text])
describeWorkingStorageResponse_diskIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeWorkingStorageResponse
-> f DescribeWorkingStorageResponse
describeWorkingStorageResponse_diskIds = (DescribeWorkingStorageResponse -> Maybe [Text])
-> (DescribeWorkingStorageResponse
    -> Maybe [Text] -> DescribeWorkingStorageResponse)
-> Lens
     DescribeWorkingStorageResponse
     DescribeWorkingStorageResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkingStorageResponse' {Maybe [Text]
diskIds :: Maybe [Text]
$sel:diskIds:DescribeWorkingStorageResponse' :: DescribeWorkingStorageResponse -> Maybe [Text]
diskIds} -> Maybe [Text]
diskIds) (\s :: DescribeWorkingStorageResponse
s@DescribeWorkingStorageResponse' {} Maybe [Text]
a -> DescribeWorkingStorageResponse
s {$sel:diskIds:DescribeWorkingStorageResponse' :: Maybe [Text]
diskIds = Maybe [Text]
a} :: DescribeWorkingStorageResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeWorkingStorageResponse
 -> f DescribeWorkingStorageResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeWorkingStorageResponse
-> f DescribeWorkingStorageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The total working storage in bytes allocated for the gateway. If no
-- working storage is configured for the gateway, this field returns 0.
describeWorkingStorageResponse_workingStorageAllocatedInBytes :: Lens.Lens' DescribeWorkingStorageResponse (Prelude.Maybe Prelude.Integer)
describeWorkingStorageResponse_workingStorageAllocatedInBytes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeWorkingStorageResponse
-> f DescribeWorkingStorageResponse
describeWorkingStorageResponse_workingStorageAllocatedInBytes = (DescribeWorkingStorageResponse -> Maybe Integer)
-> (DescribeWorkingStorageResponse
    -> Maybe Integer -> DescribeWorkingStorageResponse)
-> Lens
     DescribeWorkingStorageResponse
     DescribeWorkingStorageResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkingStorageResponse' {Maybe Integer
workingStorageAllocatedInBytes :: Maybe Integer
$sel:workingStorageAllocatedInBytes:DescribeWorkingStorageResponse' :: DescribeWorkingStorageResponse -> Maybe Integer
workingStorageAllocatedInBytes} -> Maybe Integer
workingStorageAllocatedInBytes) (\s :: DescribeWorkingStorageResponse
s@DescribeWorkingStorageResponse' {} Maybe Integer
a -> DescribeWorkingStorageResponse
s {$sel:workingStorageAllocatedInBytes:DescribeWorkingStorageResponse' :: Maybe Integer
workingStorageAllocatedInBytes = Maybe Integer
a} :: DescribeWorkingStorageResponse)

-- | The total working storage in bytes in use by the gateway. If no working
-- storage is configured for the gateway, this field returns 0.
describeWorkingStorageResponse_workingStorageUsedInBytes :: Lens.Lens' DescribeWorkingStorageResponse (Prelude.Maybe Prelude.Integer)
describeWorkingStorageResponse_workingStorageUsedInBytes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeWorkingStorageResponse
-> f DescribeWorkingStorageResponse
describeWorkingStorageResponse_workingStorageUsedInBytes = (DescribeWorkingStorageResponse -> Maybe Integer)
-> (DescribeWorkingStorageResponse
    -> Maybe Integer -> DescribeWorkingStorageResponse)
-> Lens
     DescribeWorkingStorageResponse
     DescribeWorkingStorageResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkingStorageResponse' {Maybe Integer
workingStorageUsedInBytes :: Maybe Integer
$sel:workingStorageUsedInBytes:DescribeWorkingStorageResponse' :: DescribeWorkingStorageResponse -> Maybe Integer
workingStorageUsedInBytes} -> Maybe Integer
workingStorageUsedInBytes) (\s :: DescribeWorkingStorageResponse
s@DescribeWorkingStorageResponse' {} Maybe Integer
a -> DescribeWorkingStorageResponse
s {$sel:workingStorageUsedInBytes:DescribeWorkingStorageResponse' :: Maybe Integer
workingStorageUsedInBytes = Maybe Integer
a} :: DescribeWorkingStorageResponse)

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

instance
  Prelude.NFData
    DescribeWorkingStorageResponse