{-# 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.DescribeStorediSCSIVolumes
-- 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 the description of the gateway volumes specified in the request.
-- The list of gateway volumes in the request must be from one gateway. In
-- the response, Storage Gateway returns volume information sorted by
-- volume ARNs. This operation is only supported in stored volume gateway
-- type.
module Amazonka.StorageGateway.DescribeStorediSCSIVolumes
  ( -- * Creating a Request
    DescribeStorediSCSIVolumes (..),
    newDescribeStorediSCSIVolumes,

    -- * Request Lenses
    describeStorediSCSIVolumes_volumeARNs,

    -- * Destructuring the Response
    DescribeStorediSCSIVolumesResponse (..),
    newDescribeStorediSCSIVolumesResponse,

    -- * Response Lenses
    describeStorediSCSIVolumesResponse_storediSCSIVolumes,
    describeStorediSCSIVolumesResponse_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 a list of
-- DescribeStorediSCSIVolumesInput$VolumeARNs.
--
-- /See:/ 'newDescribeStorediSCSIVolumes' smart constructor.
data DescribeStorediSCSIVolumes = DescribeStorediSCSIVolumes'
  { -- | An array of strings where each string represents the Amazon Resource
    -- Name (ARN) of a stored volume. All of the specified stored volumes must
    -- be from the same gateway. Use ListVolumes to get volume ARNs for a
    -- gateway.
    DescribeStorediSCSIVolumes -> [Text]
volumeARNs :: [Prelude.Text]
  }
  deriving (DescribeStorediSCSIVolumes -> DescribeStorediSCSIVolumes -> Bool
(DescribeStorediSCSIVolumes -> DescribeStorediSCSIVolumes -> Bool)
-> (DescribeStorediSCSIVolumes
    -> DescribeStorediSCSIVolumes -> Bool)
-> Eq DescribeStorediSCSIVolumes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStorediSCSIVolumes -> DescribeStorediSCSIVolumes -> Bool
$c/= :: DescribeStorediSCSIVolumes -> DescribeStorediSCSIVolumes -> Bool
== :: DescribeStorediSCSIVolumes -> DescribeStorediSCSIVolumes -> Bool
$c== :: DescribeStorediSCSIVolumes -> DescribeStorediSCSIVolumes -> Bool
Prelude.Eq, ReadPrec [DescribeStorediSCSIVolumes]
ReadPrec DescribeStorediSCSIVolumes
Int -> ReadS DescribeStorediSCSIVolumes
ReadS [DescribeStorediSCSIVolumes]
(Int -> ReadS DescribeStorediSCSIVolumes)
-> ReadS [DescribeStorediSCSIVolumes]
-> ReadPrec DescribeStorediSCSIVolumes
-> ReadPrec [DescribeStorediSCSIVolumes]
-> Read DescribeStorediSCSIVolumes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStorediSCSIVolumes]
$creadListPrec :: ReadPrec [DescribeStorediSCSIVolumes]
readPrec :: ReadPrec DescribeStorediSCSIVolumes
$creadPrec :: ReadPrec DescribeStorediSCSIVolumes
readList :: ReadS [DescribeStorediSCSIVolumes]
$creadList :: ReadS [DescribeStorediSCSIVolumes]
readsPrec :: Int -> ReadS DescribeStorediSCSIVolumes
$creadsPrec :: Int -> ReadS DescribeStorediSCSIVolumes
Prelude.Read, Int -> DescribeStorediSCSIVolumes -> ShowS
[DescribeStorediSCSIVolumes] -> ShowS
DescribeStorediSCSIVolumes -> String
(Int -> DescribeStorediSCSIVolumes -> ShowS)
-> (DescribeStorediSCSIVolumes -> String)
-> ([DescribeStorediSCSIVolumes] -> ShowS)
-> Show DescribeStorediSCSIVolumes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStorediSCSIVolumes] -> ShowS
$cshowList :: [DescribeStorediSCSIVolumes] -> ShowS
show :: DescribeStorediSCSIVolumes -> String
$cshow :: DescribeStorediSCSIVolumes -> String
showsPrec :: Int -> DescribeStorediSCSIVolumes -> ShowS
$cshowsPrec :: Int -> DescribeStorediSCSIVolumes -> ShowS
Prelude.Show, (forall x.
 DescribeStorediSCSIVolumes -> Rep DescribeStorediSCSIVolumes x)
-> (forall x.
    Rep DescribeStorediSCSIVolumes x -> DescribeStorediSCSIVolumes)
-> Generic DescribeStorediSCSIVolumes
forall x.
Rep DescribeStorediSCSIVolumes x -> DescribeStorediSCSIVolumes
forall x.
DescribeStorediSCSIVolumes -> Rep DescribeStorediSCSIVolumes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStorediSCSIVolumes x -> DescribeStorediSCSIVolumes
$cfrom :: forall x.
DescribeStorediSCSIVolumes -> Rep DescribeStorediSCSIVolumes x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStorediSCSIVolumes' 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:
--
-- 'volumeARNs', 'describeStorediSCSIVolumes_volumeARNs' - An array of strings where each string represents the Amazon Resource
-- Name (ARN) of a stored volume. All of the specified stored volumes must
-- be from the same gateway. Use ListVolumes to get volume ARNs for a
-- gateway.
newDescribeStorediSCSIVolumes ::
  DescribeStorediSCSIVolumes
newDescribeStorediSCSIVolumes :: DescribeStorediSCSIVolumes
newDescribeStorediSCSIVolumes =
  DescribeStorediSCSIVolumes' :: [Text] -> DescribeStorediSCSIVolumes
DescribeStorediSCSIVolumes'
    { $sel:volumeARNs:DescribeStorediSCSIVolumes' :: [Text]
volumeARNs =
        [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | An array of strings where each string represents the Amazon Resource
-- Name (ARN) of a stored volume. All of the specified stored volumes must
-- be from the same gateway. Use ListVolumes to get volume ARNs for a
-- gateway.
describeStorediSCSIVolumes_volumeARNs :: Lens.Lens' DescribeStorediSCSIVolumes [Prelude.Text]
describeStorediSCSIVolumes_volumeARNs :: ([Text] -> f [Text])
-> DescribeStorediSCSIVolumes -> f DescribeStorediSCSIVolumes
describeStorediSCSIVolumes_volumeARNs = (DescribeStorediSCSIVolumes -> [Text])
-> (DescribeStorediSCSIVolumes
    -> [Text] -> DescribeStorediSCSIVolumes)
-> Lens
     DescribeStorediSCSIVolumes DescribeStorediSCSIVolumes [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStorediSCSIVolumes' {[Text]
volumeARNs :: [Text]
$sel:volumeARNs:DescribeStorediSCSIVolumes' :: DescribeStorediSCSIVolumes -> [Text]
volumeARNs} -> [Text]
volumeARNs) (\s :: DescribeStorediSCSIVolumes
s@DescribeStorediSCSIVolumes' {} [Text]
a -> DescribeStorediSCSIVolumes
s {$sel:volumeARNs:DescribeStorediSCSIVolumes' :: [Text]
volumeARNs = [Text]
a} :: DescribeStorediSCSIVolumes) (([Text] -> f [Text])
 -> DescribeStorediSCSIVolumes -> f DescribeStorediSCSIVolumes)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> DescribeStorediSCSIVolumes
-> f DescribeStorediSCSIVolumes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeStorediSCSIVolumes

instance Core.ToHeaders DescribeStorediSCSIVolumes where
  toHeaders :: DescribeStorediSCSIVolumes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeStorediSCSIVolumes -> 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.DescribeStorediSCSIVolumes" ::
                          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 DescribeStorediSCSIVolumes where
  toJSON :: DescribeStorediSCSIVolumes -> Value
toJSON DescribeStorediSCSIVolumes' {[Text]
volumeARNs :: [Text]
$sel:volumeARNs:DescribeStorediSCSIVolumes' :: DescribeStorediSCSIVolumes -> [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
"VolumeARNs" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
volumeARNs)]
      )

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

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

-- | /See:/ 'newDescribeStorediSCSIVolumesResponse' smart constructor.
data DescribeStorediSCSIVolumesResponse = DescribeStorediSCSIVolumesResponse'
  { -- | Describes a single unit of output from DescribeStorediSCSIVolumes. The
    -- following fields are returned:
    --
    -- -   @ChapEnabled@: Indicates whether mutual CHAP is enabled for the
    --     iSCSI target.
    --
    -- -   @LunNumber@: The logical disk number.
    --
    -- -   @NetworkInterfaceId@: The network interface ID of the stored volume
    --     that initiator use to map the stored volume as an iSCSI target.
    --
    -- -   @NetworkInterfacePort@: The port used to communicate with iSCSI
    --     targets.
    --
    -- -   @PreservedExistingData@: Indicates when the stored volume was
    --     created, existing data on the underlying local disk was preserved.
    --
    -- -   @SourceSnapshotId@: If the stored volume was created from a
    --     snapshot, this field contains the snapshot ID used, e.g.
    --     @snap-1122aabb@. Otherwise, this field is not included.
    --
    -- -   @StorediSCSIVolumes@: An array of StorediSCSIVolume objects where
    --     each object contains metadata about one stored volume.
    --
    -- -   @TargetARN@: The Amazon Resource Name (ARN) of the volume target.
    --
    -- -   @VolumeARN@: The Amazon Resource Name (ARN) of the stored volume.
    --
    -- -   @VolumeDiskId@: The disk ID of the local disk that was specified in
    --     the CreateStorediSCSIVolume operation.
    --
    -- -   @VolumeId@: The unique identifier of the storage volume, e.g.
    --     @vol-1122AABB@.
    --
    -- -   @VolumeiSCSIAttributes@: An VolumeiSCSIAttributes object that
    --     represents a collection of iSCSI attributes for one stored volume.
    --
    -- -   @VolumeProgress@: Represents the percentage complete if the volume
    --     is restoring or bootstrapping that represents the percent of data
    --     transferred. This field does not appear in the response if the
    --     stored volume is not restoring or bootstrapping.
    --
    -- -   @VolumeSizeInBytes@: The size of the volume in bytes.
    --
    -- -   @VolumeStatus@: One of the @VolumeStatus@ values that indicates the
    --     state of the volume.
    --
    -- -   @VolumeType@: One of the enumeration values describing the type of
    --     the volume. Currently, only @STORED@ volumes are supported.
    DescribeStorediSCSIVolumesResponse -> Maybe [StorediSCSIVolume]
storediSCSIVolumes :: Prelude.Maybe [StorediSCSIVolume],
    -- | The response's http status code.
    DescribeStorediSCSIVolumesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeStorediSCSIVolumesResponse
-> DescribeStorediSCSIVolumesResponse -> Bool
(DescribeStorediSCSIVolumesResponse
 -> DescribeStorediSCSIVolumesResponse -> Bool)
-> (DescribeStorediSCSIVolumesResponse
    -> DescribeStorediSCSIVolumesResponse -> Bool)
-> Eq DescribeStorediSCSIVolumesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStorediSCSIVolumesResponse
-> DescribeStorediSCSIVolumesResponse -> Bool
$c/= :: DescribeStorediSCSIVolumesResponse
-> DescribeStorediSCSIVolumesResponse -> Bool
== :: DescribeStorediSCSIVolumesResponse
-> DescribeStorediSCSIVolumesResponse -> Bool
$c== :: DescribeStorediSCSIVolumesResponse
-> DescribeStorediSCSIVolumesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeStorediSCSIVolumesResponse]
ReadPrec DescribeStorediSCSIVolumesResponse
Int -> ReadS DescribeStorediSCSIVolumesResponse
ReadS [DescribeStorediSCSIVolumesResponse]
(Int -> ReadS DescribeStorediSCSIVolumesResponse)
-> ReadS [DescribeStorediSCSIVolumesResponse]
-> ReadPrec DescribeStorediSCSIVolumesResponse
-> ReadPrec [DescribeStorediSCSIVolumesResponse]
-> Read DescribeStorediSCSIVolumesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStorediSCSIVolumesResponse]
$creadListPrec :: ReadPrec [DescribeStorediSCSIVolumesResponse]
readPrec :: ReadPrec DescribeStorediSCSIVolumesResponse
$creadPrec :: ReadPrec DescribeStorediSCSIVolumesResponse
readList :: ReadS [DescribeStorediSCSIVolumesResponse]
$creadList :: ReadS [DescribeStorediSCSIVolumesResponse]
readsPrec :: Int -> ReadS DescribeStorediSCSIVolumesResponse
$creadsPrec :: Int -> ReadS DescribeStorediSCSIVolumesResponse
Prelude.Read, Int -> DescribeStorediSCSIVolumesResponse -> ShowS
[DescribeStorediSCSIVolumesResponse] -> ShowS
DescribeStorediSCSIVolumesResponse -> String
(Int -> DescribeStorediSCSIVolumesResponse -> ShowS)
-> (DescribeStorediSCSIVolumesResponse -> String)
-> ([DescribeStorediSCSIVolumesResponse] -> ShowS)
-> Show DescribeStorediSCSIVolumesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStorediSCSIVolumesResponse] -> ShowS
$cshowList :: [DescribeStorediSCSIVolumesResponse] -> ShowS
show :: DescribeStorediSCSIVolumesResponse -> String
$cshow :: DescribeStorediSCSIVolumesResponse -> String
showsPrec :: Int -> DescribeStorediSCSIVolumesResponse -> ShowS
$cshowsPrec :: Int -> DescribeStorediSCSIVolumesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeStorediSCSIVolumesResponse
 -> Rep DescribeStorediSCSIVolumesResponse x)
-> (forall x.
    Rep DescribeStorediSCSIVolumesResponse x
    -> DescribeStorediSCSIVolumesResponse)
-> Generic DescribeStorediSCSIVolumesResponse
forall x.
Rep DescribeStorediSCSIVolumesResponse x
-> DescribeStorediSCSIVolumesResponse
forall x.
DescribeStorediSCSIVolumesResponse
-> Rep DescribeStorediSCSIVolumesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStorediSCSIVolumesResponse x
-> DescribeStorediSCSIVolumesResponse
$cfrom :: forall x.
DescribeStorediSCSIVolumesResponse
-> Rep DescribeStorediSCSIVolumesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStorediSCSIVolumesResponse' 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:
--
-- 'storediSCSIVolumes', 'describeStorediSCSIVolumesResponse_storediSCSIVolumes' - Describes a single unit of output from DescribeStorediSCSIVolumes. The
-- following fields are returned:
--
-- -   @ChapEnabled@: Indicates whether mutual CHAP is enabled for the
--     iSCSI target.
--
-- -   @LunNumber@: The logical disk number.
--
-- -   @NetworkInterfaceId@: The network interface ID of the stored volume
--     that initiator use to map the stored volume as an iSCSI target.
--
-- -   @NetworkInterfacePort@: The port used to communicate with iSCSI
--     targets.
--
-- -   @PreservedExistingData@: Indicates when the stored volume was
--     created, existing data on the underlying local disk was preserved.
--
-- -   @SourceSnapshotId@: If the stored volume was created from a
--     snapshot, this field contains the snapshot ID used, e.g.
--     @snap-1122aabb@. Otherwise, this field is not included.
--
-- -   @StorediSCSIVolumes@: An array of StorediSCSIVolume objects where
--     each object contains metadata about one stored volume.
--
-- -   @TargetARN@: The Amazon Resource Name (ARN) of the volume target.
--
-- -   @VolumeARN@: The Amazon Resource Name (ARN) of the stored volume.
--
-- -   @VolumeDiskId@: The disk ID of the local disk that was specified in
--     the CreateStorediSCSIVolume operation.
--
-- -   @VolumeId@: The unique identifier of the storage volume, e.g.
--     @vol-1122AABB@.
--
-- -   @VolumeiSCSIAttributes@: An VolumeiSCSIAttributes object that
--     represents a collection of iSCSI attributes for one stored volume.
--
-- -   @VolumeProgress@: Represents the percentage complete if the volume
--     is restoring or bootstrapping that represents the percent of data
--     transferred. This field does not appear in the response if the
--     stored volume is not restoring or bootstrapping.
--
-- -   @VolumeSizeInBytes@: The size of the volume in bytes.
--
-- -   @VolumeStatus@: One of the @VolumeStatus@ values that indicates the
--     state of the volume.
--
-- -   @VolumeType@: One of the enumeration values describing the type of
--     the volume. Currently, only @STORED@ volumes are supported.
--
-- 'httpStatus', 'describeStorediSCSIVolumesResponse_httpStatus' - The response's http status code.
newDescribeStorediSCSIVolumesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeStorediSCSIVolumesResponse
newDescribeStorediSCSIVolumesResponse :: Int -> DescribeStorediSCSIVolumesResponse
newDescribeStorediSCSIVolumesResponse Int
pHttpStatus_ =
  DescribeStorediSCSIVolumesResponse' :: Maybe [StorediSCSIVolume]
-> Int -> DescribeStorediSCSIVolumesResponse
DescribeStorediSCSIVolumesResponse'
    { $sel:storediSCSIVolumes:DescribeStorediSCSIVolumesResponse' :: Maybe [StorediSCSIVolume]
storediSCSIVolumes =
        Maybe [StorediSCSIVolume]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeStorediSCSIVolumesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Describes a single unit of output from DescribeStorediSCSIVolumes. The
-- following fields are returned:
--
-- -   @ChapEnabled@: Indicates whether mutual CHAP is enabled for the
--     iSCSI target.
--
-- -   @LunNumber@: The logical disk number.
--
-- -   @NetworkInterfaceId@: The network interface ID of the stored volume
--     that initiator use to map the stored volume as an iSCSI target.
--
-- -   @NetworkInterfacePort@: The port used to communicate with iSCSI
--     targets.
--
-- -   @PreservedExistingData@: Indicates when the stored volume was
--     created, existing data on the underlying local disk was preserved.
--
-- -   @SourceSnapshotId@: If the stored volume was created from a
--     snapshot, this field contains the snapshot ID used, e.g.
--     @snap-1122aabb@. Otherwise, this field is not included.
--
-- -   @StorediSCSIVolumes@: An array of StorediSCSIVolume objects where
--     each object contains metadata about one stored volume.
--
-- -   @TargetARN@: The Amazon Resource Name (ARN) of the volume target.
--
-- -   @VolumeARN@: The Amazon Resource Name (ARN) of the stored volume.
--
-- -   @VolumeDiskId@: The disk ID of the local disk that was specified in
--     the CreateStorediSCSIVolume operation.
--
-- -   @VolumeId@: The unique identifier of the storage volume, e.g.
--     @vol-1122AABB@.
--
-- -   @VolumeiSCSIAttributes@: An VolumeiSCSIAttributes object that
--     represents a collection of iSCSI attributes for one stored volume.
--
-- -   @VolumeProgress@: Represents the percentage complete if the volume
--     is restoring or bootstrapping that represents the percent of data
--     transferred. This field does not appear in the response if the
--     stored volume is not restoring or bootstrapping.
--
-- -   @VolumeSizeInBytes@: The size of the volume in bytes.
--
-- -   @VolumeStatus@: One of the @VolumeStatus@ values that indicates the
--     state of the volume.
--
-- -   @VolumeType@: One of the enumeration values describing the type of
--     the volume. Currently, only @STORED@ volumes are supported.
describeStorediSCSIVolumesResponse_storediSCSIVolumes :: Lens.Lens' DescribeStorediSCSIVolumesResponse (Prelude.Maybe [StorediSCSIVolume])
describeStorediSCSIVolumesResponse_storediSCSIVolumes :: (Maybe [StorediSCSIVolume] -> f (Maybe [StorediSCSIVolume]))
-> DescribeStorediSCSIVolumesResponse
-> f DescribeStorediSCSIVolumesResponse
describeStorediSCSIVolumesResponse_storediSCSIVolumes = (DescribeStorediSCSIVolumesResponse -> Maybe [StorediSCSIVolume])
-> (DescribeStorediSCSIVolumesResponse
    -> Maybe [StorediSCSIVolume] -> DescribeStorediSCSIVolumesResponse)
-> Lens
     DescribeStorediSCSIVolumesResponse
     DescribeStorediSCSIVolumesResponse
     (Maybe [StorediSCSIVolume])
     (Maybe [StorediSCSIVolume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStorediSCSIVolumesResponse' {Maybe [StorediSCSIVolume]
storediSCSIVolumes :: Maybe [StorediSCSIVolume]
$sel:storediSCSIVolumes:DescribeStorediSCSIVolumesResponse' :: DescribeStorediSCSIVolumesResponse -> Maybe [StorediSCSIVolume]
storediSCSIVolumes} -> Maybe [StorediSCSIVolume]
storediSCSIVolumes) (\s :: DescribeStorediSCSIVolumesResponse
s@DescribeStorediSCSIVolumesResponse' {} Maybe [StorediSCSIVolume]
a -> DescribeStorediSCSIVolumesResponse
s {$sel:storediSCSIVolumes:DescribeStorediSCSIVolumesResponse' :: Maybe [StorediSCSIVolume]
storediSCSIVolumes = Maybe [StorediSCSIVolume]
a} :: DescribeStorediSCSIVolumesResponse) ((Maybe [StorediSCSIVolume] -> f (Maybe [StorediSCSIVolume]))
 -> DescribeStorediSCSIVolumesResponse
 -> f DescribeStorediSCSIVolumesResponse)
-> ((Maybe [StorediSCSIVolume] -> f (Maybe [StorediSCSIVolume]))
    -> Maybe [StorediSCSIVolume] -> f (Maybe [StorediSCSIVolume]))
-> (Maybe [StorediSCSIVolume] -> f (Maybe [StorediSCSIVolume]))
-> DescribeStorediSCSIVolumesResponse
-> f DescribeStorediSCSIVolumesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StorediSCSIVolume]
  [StorediSCSIVolume]
  [StorediSCSIVolume]
  [StorediSCSIVolume]
-> Iso
     (Maybe [StorediSCSIVolume])
     (Maybe [StorediSCSIVolume])
     (Maybe [StorediSCSIVolume])
     (Maybe [StorediSCSIVolume])
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
  [StorediSCSIVolume]
  [StorediSCSIVolume]
  [StorediSCSIVolume]
  [StorediSCSIVolume]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeStorediSCSIVolumesResponse