{-# 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.OpsWorks.DescribeVolumes
-- 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)
--
-- Describes an instance\'s Amazon EBS volumes.
--
-- This call accepts only one resource-identifying parameter.
--
-- __Required Permissions__: To use this action, an IAM user must have a
-- Show, Deploy, or Manage permissions level for the stack, or an attached
-- policy that explicitly grants permissions. For more information about
-- user permissions, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html Managing User Permissions>.
module Amazonka.OpsWorks.DescribeVolumes
  ( -- * Creating a Request
    DescribeVolumes (..),
    newDescribeVolumes,

    -- * Request Lenses
    describeVolumes_instanceId,
    describeVolumes_volumeIds,
    describeVolumes_raidArrayId,
    describeVolumes_stackId,

    -- * Destructuring the Response
    DescribeVolumesResponse (..),
    newDescribeVolumesResponse,

    -- * Response Lenses
    describeVolumesResponse_volumes,
    describeVolumesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeVolumes' smart constructor.
data DescribeVolumes = DescribeVolumes'
  { -- | The instance ID. If you use this parameter, @DescribeVolumes@ returns
    -- descriptions of the volumes associated with the specified instance.
    DescribeVolumes -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | Am array of volume IDs. If you use this parameter, @DescribeVolumes@
    -- returns descriptions of the specified volumes. Otherwise, it returns a
    -- description of every volume.
    DescribeVolumes -> Maybe [Text]
volumeIds :: Prelude.Maybe [Prelude.Text],
    -- | The RAID array ID. If you use this parameter, @DescribeVolumes@ returns
    -- descriptions of the volumes associated with the specified RAID array.
    DescribeVolumes -> Maybe Text
raidArrayId :: Prelude.Maybe Prelude.Text,
    -- | A stack ID. The action describes the stack\'s registered Amazon EBS
    -- volumes.
    DescribeVolumes -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeVolumes -> DescribeVolumes -> Bool
(DescribeVolumes -> DescribeVolumes -> Bool)
-> (DescribeVolumes -> DescribeVolumes -> Bool)
-> Eq DescribeVolumes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVolumes -> DescribeVolumes -> Bool
$c/= :: DescribeVolumes -> DescribeVolumes -> Bool
== :: DescribeVolumes -> DescribeVolumes -> Bool
$c== :: DescribeVolumes -> DescribeVolumes -> Bool
Prelude.Eq, ReadPrec [DescribeVolumes]
ReadPrec DescribeVolumes
Int -> ReadS DescribeVolumes
ReadS [DescribeVolumes]
(Int -> ReadS DescribeVolumes)
-> ReadS [DescribeVolumes]
-> ReadPrec DescribeVolumes
-> ReadPrec [DescribeVolumes]
-> Read DescribeVolumes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVolumes]
$creadListPrec :: ReadPrec [DescribeVolumes]
readPrec :: ReadPrec DescribeVolumes
$creadPrec :: ReadPrec DescribeVolumes
readList :: ReadS [DescribeVolumes]
$creadList :: ReadS [DescribeVolumes]
readsPrec :: Int -> ReadS DescribeVolumes
$creadsPrec :: Int -> ReadS DescribeVolumes
Prelude.Read, Int -> DescribeVolumes -> ShowS
[DescribeVolumes] -> ShowS
DescribeVolumes -> String
(Int -> DescribeVolumes -> ShowS)
-> (DescribeVolumes -> String)
-> ([DescribeVolumes] -> ShowS)
-> Show DescribeVolumes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVolumes] -> ShowS
$cshowList :: [DescribeVolumes] -> ShowS
show :: DescribeVolumes -> String
$cshow :: DescribeVolumes -> String
showsPrec :: Int -> DescribeVolumes -> ShowS
$cshowsPrec :: Int -> DescribeVolumes -> ShowS
Prelude.Show, (forall x. DescribeVolumes -> Rep DescribeVolumes x)
-> (forall x. Rep DescribeVolumes x -> DescribeVolumes)
-> Generic DescribeVolumes
forall x. Rep DescribeVolumes x -> DescribeVolumes
forall x. DescribeVolumes -> Rep DescribeVolumes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeVolumes x -> DescribeVolumes
$cfrom :: forall x. DescribeVolumes -> Rep DescribeVolumes x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVolumes' 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:
--
-- 'instanceId', 'describeVolumes_instanceId' - The instance ID. If you use this parameter, @DescribeVolumes@ returns
-- descriptions of the volumes associated with the specified instance.
--
-- 'volumeIds', 'describeVolumes_volumeIds' - Am array of volume IDs. If you use this parameter, @DescribeVolumes@
-- returns descriptions of the specified volumes. Otherwise, it returns a
-- description of every volume.
--
-- 'raidArrayId', 'describeVolumes_raidArrayId' - The RAID array ID. If you use this parameter, @DescribeVolumes@ returns
-- descriptions of the volumes associated with the specified RAID array.
--
-- 'stackId', 'describeVolumes_stackId' - A stack ID. The action describes the stack\'s registered Amazon EBS
-- volumes.
newDescribeVolumes ::
  DescribeVolumes
newDescribeVolumes :: DescribeVolumes
newDescribeVolumes =
  DescribeVolumes' :: Maybe Text
-> Maybe [Text] -> Maybe Text -> Maybe Text -> DescribeVolumes
DescribeVolumes'
    { $sel:instanceId:DescribeVolumes' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeIds:DescribeVolumes' :: Maybe [Text]
volumeIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:raidArrayId:DescribeVolumes' :: Maybe Text
raidArrayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeVolumes' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The instance ID. If you use this parameter, @DescribeVolumes@ returns
-- descriptions of the volumes associated with the specified instance.
describeVolumes_instanceId :: Lens.Lens' DescribeVolumes (Prelude.Maybe Prelude.Text)
describeVolumes_instanceId :: (Maybe Text -> f (Maybe Text))
-> DescribeVolumes -> f DescribeVolumes
describeVolumes_instanceId = (DescribeVolumes -> Maybe Text)
-> (DescribeVolumes -> Maybe Text -> DescribeVolumes)
-> Lens DescribeVolumes DescribeVolumes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumes' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:DescribeVolumes' :: DescribeVolumes -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: DescribeVolumes
s@DescribeVolumes' {} Maybe Text
a -> DescribeVolumes
s {$sel:instanceId:DescribeVolumes' :: Maybe Text
instanceId = Maybe Text
a} :: DescribeVolumes)

-- | Am array of volume IDs. If you use this parameter, @DescribeVolumes@
-- returns descriptions of the specified volumes. Otherwise, it returns a
-- description of every volume.
describeVolumes_volumeIds :: Lens.Lens' DescribeVolumes (Prelude.Maybe [Prelude.Text])
describeVolumes_volumeIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeVolumes -> f DescribeVolumes
describeVolumes_volumeIds = (DescribeVolumes -> Maybe [Text])
-> (DescribeVolumes -> Maybe [Text] -> DescribeVolumes)
-> Lens
     DescribeVolumes DescribeVolumes (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumes' {Maybe [Text]
volumeIds :: Maybe [Text]
$sel:volumeIds:DescribeVolumes' :: DescribeVolumes -> Maybe [Text]
volumeIds} -> Maybe [Text]
volumeIds) (\s :: DescribeVolumes
s@DescribeVolumes' {} Maybe [Text]
a -> DescribeVolumes
s {$sel:volumeIds:DescribeVolumes' :: Maybe [Text]
volumeIds = Maybe [Text]
a} :: DescribeVolumes) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeVolumes -> f DescribeVolumes)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeVolumes
-> f DescribeVolumes
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 RAID array ID. If you use this parameter, @DescribeVolumes@ returns
-- descriptions of the volumes associated with the specified RAID array.
describeVolumes_raidArrayId :: Lens.Lens' DescribeVolumes (Prelude.Maybe Prelude.Text)
describeVolumes_raidArrayId :: (Maybe Text -> f (Maybe Text))
-> DescribeVolumes -> f DescribeVolumes
describeVolumes_raidArrayId = (DescribeVolumes -> Maybe Text)
-> (DescribeVolumes -> Maybe Text -> DescribeVolumes)
-> Lens DescribeVolumes DescribeVolumes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumes' {Maybe Text
raidArrayId :: Maybe Text
$sel:raidArrayId:DescribeVolumes' :: DescribeVolumes -> Maybe Text
raidArrayId} -> Maybe Text
raidArrayId) (\s :: DescribeVolumes
s@DescribeVolumes' {} Maybe Text
a -> DescribeVolumes
s {$sel:raidArrayId:DescribeVolumes' :: Maybe Text
raidArrayId = Maybe Text
a} :: DescribeVolumes)

-- | A stack ID. The action describes the stack\'s registered Amazon EBS
-- volumes.
describeVolumes_stackId :: Lens.Lens' DescribeVolumes (Prelude.Maybe Prelude.Text)
describeVolumes_stackId :: (Maybe Text -> f (Maybe Text))
-> DescribeVolumes -> f DescribeVolumes
describeVolumes_stackId = (DescribeVolumes -> Maybe Text)
-> (DescribeVolumes -> Maybe Text -> DescribeVolumes)
-> Lens DescribeVolumes DescribeVolumes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumes' {Maybe Text
stackId :: Maybe Text
$sel:stackId:DescribeVolumes' :: DescribeVolumes -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: DescribeVolumes
s@DescribeVolumes' {} Maybe Text
a -> DescribeVolumes
s {$sel:stackId:DescribeVolumes' :: Maybe Text
stackId = Maybe Text
a} :: DescribeVolumes)

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

instance Prelude.NFData DescribeVolumes

instance Core.ToHeaders DescribeVolumes where
  toHeaders :: DescribeVolumes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeVolumes -> 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
"OpsWorks_20130218.DescribeVolumes" ::
                          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 DescribeVolumes where
  toJSON :: DescribeVolumes -> Value
toJSON DescribeVolumes' {Maybe [Text]
Maybe Text
stackId :: Maybe Text
raidArrayId :: Maybe Text
volumeIds :: Maybe [Text]
instanceId :: Maybe Text
$sel:stackId:DescribeVolumes' :: DescribeVolumes -> Maybe Text
$sel:raidArrayId:DescribeVolumes' :: DescribeVolumes -> Maybe Text
$sel:volumeIds:DescribeVolumes' :: DescribeVolumes -> Maybe [Text]
$sel:instanceId:DescribeVolumes' :: DescribeVolumes -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InstanceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceId,
            (Text
"VolumeIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
volumeIds,
            (Text
"RaidArrayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
raidArrayId,
            (Text
"StackId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
stackId
          ]
      )

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

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

-- | Contains the response to a @DescribeVolumes@ request.
--
-- /See:/ 'newDescribeVolumesResponse' smart constructor.
data DescribeVolumesResponse = DescribeVolumesResponse'
  { -- | An array of volume IDs.
    DescribeVolumesResponse -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume],
    -- | The response's http status code.
    DescribeVolumesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeVolumesResponse -> DescribeVolumesResponse -> Bool
(DescribeVolumesResponse -> DescribeVolumesResponse -> Bool)
-> (DescribeVolumesResponse -> DescribeVolumesResponse -> Bool)
-> Eq DescribeVolumesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVolumesResponse -> DescribeVolumesResponse -> Bool
$c/= :: DescribeVolumesResponse -> DescribeVolumesResponse -> Bool
== :: DescribeVolumesResponse -> DescribeVolumesResponse -> Bool
$c== :: DescribeVolumesResponse -> DescribeVolumesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeVolumesResponse]
ReadPrec DescribeVolumesResponse
Int -> ReadS DescribeVolumesResponse
ReadS [DescribeVolumesResponse]
(Int -> ReadS DescribeVolumesResponse)
-> ReadS [DescribeVolumesResponse]
-> ReadPrec DescribeVolumesResponse
-> ReadPrec [DescribeVolumesResponse]
-> Read DescribeVolumesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVolumesResponse]
$creadListPrec :: ReadPrec [DescribeVolumesResponse]
readPrec :: ReadPrec DescribeVolumesResponse
$creadPrec :: ReadPrec DescribeVolumesResponse
readList :: ReadS [DescribeVolumesResponse]
$creadList :: ReadS [DescribeVolumesResponse]
readsPrec :: Int -> ReadS DescribeVolumesResponse
$creadsPrec :: Int -> ReadS DescribeVolumesResponse
Prelude.Read, Int -> DescribeVolumesResponse -> ShowS
[DescribeVolumesResponse] -> ShowS
DescribeVolumesResponse -> String
(Int -> DescribeVolumesResponse -> ShowS)
-> (DescribeVolumesResponse -> String)
-> ([DescribeVolumesResponse] -> ShowS)
-> Show DescribeVolumesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVolumesResponse] -> ShowS
$cshowList :: [DescribeVolumesResponse] -> ShowS
show :: DescribeVolumesResponse -> String
$cshow :: DescribeVolumesResponse -> String
showsPrec :: Int -> DescribeVolumesResponse -> ShowS
$cshowsPrec :: Int -> DescribeVolumesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeVolumesResponse -> Rep DescribeVolumesResponse x)
-> (forall x.
    Rep DescribeVolumesResponse x -> DescribeVolumesResponse)
-> Generic DescribeVolumesResponse
forall x. Rep DescribeVolumesResponse x -> DescribeVolumesResponse
forall x. DescribeVolumesResponse -> Rep DescribeVolumesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeVolumesResponse x -> DescribeVolumesResponse
$cfrom :: forall x. DescribeVolumesResponse -> Rep DescribeVolumesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVolumesResponse' 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:
--
-- 'volumes', 'describeVolumesResponse_volumes' - An array of volume IDs.
--
-- 'httpStatus', 'describeVolumesResponse_httpStatus' - The response's http status code.
newDescribeVolumesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeVolumesResponse
newDescribeVolumesResponse :: Int -> DescribeVolumesResponse
newDescribeVolumesResponse Int
pHttpStatus_ =
  DescribeVolumesResponse' :: Maybe [Volume] -> Int -> DescribeVolumesResponse
DescribeVolumesResponse'
    { $sel:volumes:DescribeVolumesResponse' :: Maybe [Volume]
volumes = Maybe [Volume]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeVolumesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of volume IDs.
describeVolumesResponse_volumes :: Lens.Lens' DescribeVolumesResponse (Prelude.Maybe [Volume])
describeVolumesResponse_volumes :: (Maybe [Volume] -> f (Maybe [Volume]))
-> DescribeVolumesResponse -> f DescribeVolumesResponse
describeVolumesResponse_volumes = (DescribeVolumesResponse -> Maybe [Volume])
-> (DescribeVolumesResponse
    -> Maybe [Volume] -> DescribeVolumesResponse)
-> Lens
     DescribeVolumesResponse
     DescribeVolumesResponse
     (Maybe [Volume])
     (Maybe [Volume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumesResponse' {Maybe [Volume]
volumes :: Maybe [Volume]
$sel:volumes:DescribeVolumesResponse' :: DescribeVolumesResponse -> Maybe [Volume]
volumes} -> Maybe [Volume]
volumes) (\s :: DescribeVolumesResponse
s@DescribeVolumesResponse' {} Maybe [Volume]
a -> DescribeVolumesResponse
s {$sel:volumes:DescribeVolumesResponse' :: Maybe [Volume]
volumes = Maybe [Volume]
a} :: DescribeVolumesResponse) ((Maybe [Volume] -> f (Maybe [Volume]))
 -> DescribeVolumesResponse -> f DescribeVolumesResponse)
-> ((Maybe [Volume] -> f (Maybe [Volume]))
    -> Maybe [Volume] -> f (Maybe [Volume]))
-> (Maybe [Volume] -> f (Maybe [Volume]))
-> DescribeVolumesResponse
-> f DescribeVolumesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Volume] [Volume] [Volume] [Volume]
-> Iso
     (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume])
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 [Volume] [Volume] [Volume] [Volume]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeVolumesResponse