{-# 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.DescribeUploadBuffer
-- 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 upload buffer of a gateway. This operation
-- is supported for the stored volume, cached volume, and tape gateway
-- types.
--
-- The response includes disk IDs that are configured as upload buffer
-- space, and it includes the amount of upload buffer space allocated and
-- used.
module Amazonka.StorageGateway.DescribeUploadBuffer
  ( -- * Creating a Request
    DescribeUploadBuffer (..),
    newDescribeUploadBuffer,

    -- * Request Lenses
    describeUploadBuffer_gatewayARN,

    -- * Destructuring the Response
    DescribeUploadBufferResponse (..),
    newDescribeUploadBufferResponse,

    -- * Response Lenses
    describeUploadBufferResponse_uploadBufferAllocatedInBytes,
    describeUploadBufferResponse_gatewayARN,
    describeUploadBufferResponse_diskIds,
    describeUploadBufferResponse_uploadBufferUsedInBytes,
    describeUploadBufferResponse_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

-- | /See:/ 'newDescribeUploadBuffer' smart constructor.
data DescribeUploadBuffer = DescribeUploadBuffer'
  { DescribeUploadBuffer -> Text
gatewayARN :: Prelude.Text
  }
  deriving (DescribeUploadBuffer -> DescribeUploadBuffer -> Bool
(DescribeUploadBuffer -> DescribeUploadBuffer -> Bool)
-> (DescribeUploadBuffer -> DescribeUploadBuffer -> Bool)
-> Eq DescribeUploadBuffer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUploadBuffer -> DescribeUploadBuffer -> Bool
$c/= :: DescribeUploadBuffer -> DescribeUploadBuffer -> Bool
== :: DescribeUploadBuffer -> DescribeUploadBuffer -> Bool
$c== :: DescribeUploadBuffer -> DescribeUploadBuffer -> Bool
Prelude.Eq, ReadPrec [DescribeUploadBuffer]
ReadPrec DescribeUploadBuffer
Int -> ReadS DescribeUploadBuffer
ReadS [DescribeUploadBuffer]
(Int -> ReadS DescribeUploadBuffer)
-> ReadS [DescribeUploadBuffer]
-> ReadPrec DescribeUploadBuffer
-> ReadPrec [DescribeUploadBuffer]
-> Read DescribeUploadBuffer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUploadBuffer]
$creadListPrec :: ReadPrec [DescribeUploadBuffer]
readPrec :: ReadPrec DescribeUploadBuffer
$creadPrec :: ReadPrec DescribeUploadBuffer
readList :: ReadS [DescribeUploadBuffer]
$creadList :: ReadS [DescribeUploadBuffer]
readsPrec :: Int -> ReadS DescribeUploadBuffer
$creadsPrec :: Int -> ReadS DescribeUploadBuffer
Prelude.Read, Int -> DescribeUploadBuffer -> ShowS
[DescribeUploadBuffer] -> ShowS
DescribeUploadBuffer -> String
(Int -> DescribeUploadBuffer -> ShowS)
-> (DescribeUploadBuffer -> String)
-> ([DescribeUploadBuffer] -> ShowS)
-> Show DescribeUploadBuffer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUploadBuffer] -> ShowS
$cshowList :: [DescribeUploadBuffer] -> ShowS
show :: DescribeUploadBuffer -> String
$cshow :: DescribeUploadBuffer -> String
showsPrec :: Int -> DescribeUploadBuffer -> ShowS
$cshowsPrec :: Int -> DescribeUploadBuffer -> ShowS
Prelude.Show, (forall x. DescribeUploadBuffer -> Rep DescribeUploadBuffer x)
-> (forall x. Rep DescribeUploadBuffer x -> DescribeUploadBuffer)
-> Generic DescribeUploadBuffer
forall x. Rep DescribeUploadBuffer x -> DescribeUploadBuffer
forall x. DescribeUploadBuffer -> Rep DescribeUploadBuffer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeUploadBuffer x -> DescribeUploadBuffer
$cfrom :: forall x. DescribeUploadBuffer -> Rep DescribeUploadBuffer x
Prelude.Generic)

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

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

instance Core.AWSRequest DescribeUploadBuffer where
  type
    AWSResponse DescribeUploadBuffer =
      DescribeUploadBufferResponse
  request :: DescribeUploadBuffer -> Request DescribeUploadBuffer
request = Service -> DescribeUploadBuffer -> Request DescribeUploadBuffer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeUploadBuffer
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeUploadBuffer)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeUploadBuffer))
-> Logger
-> Service
-> Proxy DescribeUploadBuffer
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeUploadBuffer)))
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 Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe Integer
-> Int
-> DescribeUploadBufferResponse
DescribeUploadBufferResponse'
            (Maybe Integer
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Integer
 -> Int
 -> DescribeUploadBufferResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Integer
      -> Int
      -> DescribeUploadBufferResponse)
forall (f :: * -> *) a b. Functor 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
"UploadBufferAllocatedInBytes")
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Integer
   -> Int
   -> DescribeUploadBufferResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Integer -> Int -> DescribeUploadBufferResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> Int -> DescribeUploadBufferResponse)
-> Either String (Maybe [Text])
-> Either
     String (Maybe Integer -> Int -> DescribeUploadBufferResponse)
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 -> Int -> DescribeUploadBufferResponse)
-> Either String (Maybe Integer)
-> Either String (Int -> DescribeUploadBufferResponse)
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
"UploadBufferUsedInBytes")
            Either String (Int -> DescribeUploadBufferResponse)
-> Either String Int -> Either String DescribeUploadBufferResponse
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 DescribeUploadBuffer

instance Prelude.NFData DescribeUploadBuffer

instance Core.ToHeaders DescribeUploadBuffer where
  toHeaders :: DescribeUploadBuffer -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeUploadBuffer -> 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.DescribeUploadBuffer" ::
                          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 DescribeUploadBuffer where
  toJSON :: DescribeUploadBuffer -> Value
toJSON DescribeUploadBuffer' {Text
gatewayARN :: Text
$sel:gatewayARN:DescribeUploadBuffer' :: DescribeUploadBuffer -> 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 DescribeUploadBuffer where
  toPath :: DescribeUploadBuffer -> ByteString
toPath = ByteString -> DescribeUploadBuffer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeUploadBufferResponse' smart constructor.
data DescribeUploadBufferResponse = DescribeUploadBufferResponse'
  { -- | The total number of bytes allocated in the gateway\'s as upload buffer.
    DescribeUploadBufferResponse -> Maybe Integer
uploadBufferAllocatedInBytes :: Prelude.Maybe Prelude.Integer,
    DescribeUploadBufferResponse -> 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.
    DescribeUploadBufferResponse -> Maybe [Text]
diskIds :: Prelude.Maybe [Prelude.Text],
    -- | The total number of bytes being used in the gateway\'s upload buffer.
    DescribeUploadBufferResponse -> Maybe Integer
uploadBufferUsedInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    DescribeUploadBufferResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeUploadBufferResponse
-> DescribeUploadBufferResponse -> Bool
(DescribeUploadBufferResponse
 -> DescribeUploadBufferResponse -> Bool)
-> (DescribeUploadBufferResponse
    -> DescribeUploadBufferResponse -> Bool)
-> Eq DescribeUploadBufferResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeUploadBufferResponse
-> DescribeUploadBufferResponse -> Bool
$c/= :: DescribeUploadBufferResponse
-> DescribeUploadBufferResponse -> Bool
== :: DescribeUploadBufferResponse
-> DescribeUploadBufferResponse -> Bool
$c== :: DescribeUploadBufferResponse
-> DescribeUploadBufferResponse -> Bool
Prelude.Eq, ReadPrec [DescribeUploadBufferResponse]
ReadPrec DescribeUploadBufferResponse
Int -> ReadS DescribeUploadBufferResponse
ReadS [DescribeUploadBufferResponse]
(Int -> ReadS DescribeUploadBufferResponse)
-> ReadS [DescribeUploadBufferResponse]
-> ReadPrec DescribeUploadBufferResponse
-> ReadPrec [DescribeUploadBufferResponse]
-> Read DescribeUploadBufferResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeUploadBufferResponse]
$creadListPrec :: ReadPrec [DescribeUploadBufferResponse]
readPrec :: ReadPrec DescribeUploadBufferResponse
$creadPrec :: ReadPrec DescribeUploadBufferResponse
readList :: ReadS [DescribeUploadBufferResponse]
$creadList :: ReadS [DescribeUploadBufferResponse]
readsPrec :: Int -> ReadS DescribeUploadBufferResponse
$creadsPrec :: Int -> ReadS DescribeUploadBufferResponse
Prelude.Read, Int -> DescribeUploadBufferResponse -> ShowS
[DescribeUploadBufferResponse] -> ShowS
DescribeUploadBufferResponse -> String
(Int -> DescribeUploadBufferResponse -> ShowS)
-> (DescribeUploadBufferResponse -> String)
-> ([DescribeUploadBufferResponse] -> ShowS)
-> Show DescribeUploadBufferResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeUploadBufferResponse] -> ShowS
$cshowList :: [DescribeUploadBufferResponse] -> ShowS
show :: DescribeUploadBufferResponse -> String
$cshow :: DescribeUploadBufferResponse -> String
showsPrec :: Int -> DescribeUploadBufferResponse -> ShowS
$cshowsPrec :: Int -> DescribeUploadBufferResponse -> ShowS
Prelude.Show, (forall x.
 DescribeUploadBufferResponse -> Rep DescribeUploadBufferResponse x)
-> (forall x.
    Rep DescribeUploadBufferResponse x -> DescribeUploadBufferResponse)
-> Generic DescribeUploadBufferResponse
forall x.
Rep DescribeUploadBufferResponse x -> DescribeUploadBufferResponse
forall x.
DescribeUploadBufferResponse -> Rep DescribeUploadBufferResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeUploadBufferResponse x -> DescribeUploadBufferResponse
$cfrom :: forall x.
DescribeUploadBufferResponse -> Rep DescribeUploadBufferResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeUploadBufferResponse' 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:
--
-- 'uploadBufferAllocatedInBytes', 'describeUploadBufferResponse_uploadBufferAllocatedInBytes' - The total number of bytes allocated in the gateway\'s as upload buffer.
--
-- 'gatewayARN', 'describeUploadBufferResponse_gatewayARN' - Undocumented member.
--
-- 'diskIds', 'describeUploadBufferResponse_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.
--
-- 'uploadBufferUsedInBytes', 'describeUploadBufferResponse_uploadBufferUsedInBytes' - The total number of bytes being used in the gateway\'s upload buffer.
--
-- 'httpStatus', 'describeUploadBufferResponse_httpStatus' - The response's http status code.
newDescribeUploadBufferResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeUploadBufferResponse
newDescribeUploadBufferResponse :: Int -> DescribeUploadBufferResponse
newDescribeUploadBufferResponse Int
pHttpStatus_ =
  DescribeUploadBufferResponse' :: Maybe Integer
-> Maybe Text
-> Maybe [Text]
-> Maybe Integer
-> Int
-> DescribeUploadBufferResponse
DescribeUploadBufferResponse'
    { $sel:uploadBufferAllocatedInBytes:DescribeUploadBufferResponse' :: Maybe Integer
uploadBufferAllocatedInBytes =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayARN:DescribeUploadBufferResponse' :: Maybe Text
gatewayARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:diskIds:DescribeUploadBufferResponse' :: Maybe [Text]
diskIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:uploadBufferUsedInBytes:DescribeUploadBufferResponse' :: Maybe Integer
uploadBufferUsedInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeUploadBufferResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The total number of bytes allocated in the gateway\'s as upload buffer.
describeUploadBufferResponse_uploadBufferAllocatedInBytes :: Lens.Lens' DescribeUploadBufferResponse (Prelude.Maybe Prelude.Integer)
describeUploadBufferResponse_uploadBufferAllocatedInBytes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeUploadBufferResponse -> f DescribeUploadBufferResponse
describeUploadBufferResponse_uploadBufferAllocatedInBytes = (DescribeUploadBufferResponse -> Maybe Integer)
-> (DescribeUploadBufferResponse
    -> Maybe Integer -> DescribeUploadBufferResponse)
-> Lens
     DescribeUploadBufferResponse
     DescribeUploadBufferResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUploadBufferResponse' {Maybe Integer
uploadBufferAllocatedInBytes :: Maybe Integer
$sel:uploadBufferAllocatedInBytes:DescribeUploadBufferResponse' :: DescribeUploadBufferResponse -> Maybe Integer
uploadBufferAllocatedInBytes} -> Maybe Integer
uploadBufferAllocatedInBytes) (\s :: DescribeUploadBufferResponse
s@DescribeUploadBufferResponse' {} Maybe Integer
a -> DescribeUploadBufferResponse
s {$sel:uploadBufferAllocatedInBytes:DescribeUploadBufferResponse' :: Maybe Integer
uploadBufferAllocatedInBytes = Maybe Integer
a} :: DescribeUploadBufferResponse)

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

-- | 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.
describeUploadBufferResponse_diskIds :: Lens.Lens' DescribeUploadBufferResponse (Prelude.Maybe [Prelude.Text])
describeUploadBufferResponse_diskIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeUploadBufferResponse -> f DescribeUploadBufferResponse
describeUploadBufferResponse_diskIds = (DescribeUploadBufferResponse -> Maybe [Text])
-> (DescribeUploadBufferResponse
    -> Maybe [Text] -> DescribeUploadBufferResponse)
-> Lens
     DescribeUploadBufferResponse
     DescribeUploadBufferResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUploadBufferResponse' {Maybe [Text]
diskIds :: Maybe [Text]
$sel:diskIds:DescribeUploadBufferResponse' :: DescribeUploadBufferResponse -> Maybe [Text]
diskIds} -> Maybe [Text]
diskIds) (\s :: DescribeUploadBufferResponse
s@DescribeUploadBufferResponse' {} Maybe [Text]
a -> DescribeUploadBufferResponse
s {$sel:diskIds:DescribeUploadBufferResponse' :: Maybe [Text]
diskIds = Maybe [Text]
a} :: DescribeUploadBufferResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeUploadBufferResponse -> f DescribeUploadBufferResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeUploadBufferResponse
-> f DescribeUploadBufferResponse
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 number of bytes being used in the gateway\'s upload buffer.
describeUploadBufferResponse_uploadBufferUsedInBytes :: Lens.Lens' DescribeUploadBufferResponse (Prelude.Maybe Prelude.Integer)
describeUploadBufferResponse_uploadBufferUsedInBytes :: (Maybe Integer -> f (Maybe Integer))
-> DescribeUploadBufferResponse -> f DescribeUploadBufferResponse
describeUploadBufferResponse_uploadBufferUsedInBytes = (DescribeUploadBufferResponse -> Maybe Integer)
-> (DescribeUploadBufferResponse
    -> Maybe Integer -> DescribeUploadBufferResponse)
-> Lens
     DescribeUploadBufferResponse
     DescribeUploadBufferResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeUploadBufferResponse' {Maybe Integer
uploadBufferUsedInBytes :: Maybe Integer
$sel:uploadBufferUsedInBytes:DescribeUploadBufferResponse' :: DescribeUploadBufferResponse -> Maybe Integer
uploadBufferUsedInBytes} -> Maybe Integer
uploadBufferUsedInBytes) (\s :: DescribeUploadBufferResponse
s@DescribeUploadBufferResponse' {} Maybe Integer
a -> DescribeUploadBufferResponse
s {$sel:uploadBufferUsedInBytes:DescribeUploadBufferResponse' :: Maybe Integer
uploadBufferUsedInBytes = Maybe Integer
a} :: DescribeUploadBufferResponse)

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

instance Prelude.NFData DescribeUploadBufferResponse