{-# 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.DescribeRaidArrays
-- 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)
--
-- Describe an instance\'s RAID arrays.
--
-- 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.DescribeRaidArrays
  ( -- * Creating a Request
    DescribeRaidArrays (..),
    newDescribeRaidArrays,

    -- * Request Lenses
    describeRaidArrays_instanceId,
    describeRaidArrays_raidArrayIds,
    describeRaidArrays_stackId,

    -- * Destructuring the Response
    DescribeRaidArraysResponse (..),
    newDescribeRaidArraysResponse,

    -- * Response Lenses
    describeRaidArraysResponse_raidArrays,
    describeRaidArraysResponse_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:/ 'newDescribeRaidArrays' smart constructor.
data DescribeRaidArrays = DescribeRaidArrays'
  { -- | The instance ID. If you use this parameter, @DescribeRaidArrays@ returns
    -- descriptions of the RAID arrays associated with the specified instance.
    DescribeRaidArrays -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | An array of RAID array IDs. If you use this parameter,
    -- @DescribeRaidArrays@ returns descriptions of the specified arrays.
    -- Otherwise, it returns a description of every array.
    DescribeRaidArrays -> Maybe [Text]
raidArrayIds :: Prelude.Maybe [Prelude.Text],
    -- | The stack ID.
    DescribeRaidArrays -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeRaidArrays -> DescribeRaidArrays -> Bool
(DescribeRaidArrays -> DescribeRaidArrays -> Bool)
-> (DescribeRaidArrays -> DescribeRaidArrays -> Bool)
-> Eq DescribeRaidArrays
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRaidArrays -> DescribeRaidArrays -> Bool
$c/= :: DescribeRaidArrays -> DescribeRaidArrays -> Bool
== :: DescribeRaidArrays -> DescribeRaidArrays -> Bool
$c== :: DescribeRaidArrays -> DescribeRaidArrays -> Bool
Prelude.Eq, ReadPrec [DescribeRaidArrays]
ReadPrec DescribeRaidArrays
Int -> ReadS DescribeRaidArrays
ReadS [DescribeRaidArrays]
(Int -> ReadS DescribeRaidArrays)
-> ReadS [DescribeRaidArrays]
-> ReadPrec DescribeRaidArrays
-> ReadPrec [DescribeRaidArrays]
-> Read DescribeRaidArrays
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRaidArrays]
$creadListPrec :: ReadPrec [DescribeRaidArrays]
readPrec :: ReadPrec DescribeRaidArrays
$creadPrec :: ReadPrec DescribeRaidArrays
readList :: ReadS [DescribeRaidArrays]
$creadList :: ReadS [DescribeRaidArrays]
readsPrec :: Int -> ReadS DescribeRaidArrays
$creadsPrec :: Int -> ReadS DescribeRaidArrays
Prelude.Read, Int -> DescribeRaidArrays -> ShowS
[DescribeRaidArrays] -> ShowS
DescribeRaidArrays -> String
(Int -> DescribeRaidArrays -> ShowS)
-> (DescribeRaidArrays -> String)
-> ([DescribeRaidArrays] -> ShowS)
-> Show DescribeRaidArrays
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRaidArrays] -> ShowS
$cshowList :: [DescribeRaidArrays] -> ShowS
show :: DescribeRaidArrays -> String
$cshow :: DescribeRaidArrays -> String
showsPrec :: Int -> DescribeRaidArrays -> ShowS
$cshowsPrec :: Int -> DescribeRaidArrays -> ShowS
Prelude.Show, (forall x. DescribeRaidArrays -> Rep DescribeRaidArrays x)
-> (forall x. Rep DescribeRaidArrays x -> DescribeRaidArrays)
-> Generic DescribeRaidArrays
forall x. Rep DescribeRaidArrays x -> DescribeRaidArrays
forall x. DescribeRaidArrays -> Rep DescribeRaidArrays x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRaidArrays x -> DescribeRaidArrays
$cfrom :: forall x. DescribeRaidArrays -> Rep DescribeRaidArrays x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRaidArrays' 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', 'describeRaidArrays_instanceId' - The instance ID. If you use this parameter, @DescribeRaidArrays@ returns
-- descriptions of the RAID arrays associated with the specified instance.
--
-- 'raidArrayIds', 'describeRaidArrays_raidArrayIds' - An array of RAID array IDs. If you use this parameter,
-- @DescribeRaidArrays@ returns descriptions of the specified arrays.
-- Otherwise, it returns a description of every array.
--
-- 'stackId', 'describeRaidArrays_stackId' - The stack ID.
newDescribeRaidArrays ::
  DescribeRaidArrays
newDescribeRaidArrays :: DescribeRaidArrays
newDescribeRaidArrays =
  DescribeRaidArrays' :: Maybe Text -> Maybe [Text] -> Maybe Text -> DescribeRaidArrays
DescribeRaidArrays'
    { $sel:instanceId:DescribeRaidArrays' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:raidArrayIds:DescribeRaidArrays' :: Maybe [Text]
raidArrayIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeRaidArrays' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | An array of RAID array IDs. If you use this parameter,
-- @DescribeRaidArrays@ returns descriptions of the specified arrays.
-- Otherwise, it returns a description of every array.
describeRaidArrays_raidArrayIds :: Lens.Lens' DescribeRaidArrays (Prelude.Maybe [Prelude.Text])
describeRaidArrays_raidArrayIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeRaidArrays -> f DescribeRaidArrays
describeRaidArrays_raidArrayIds = (DescribeRaidArrays -> Maybe [Text])
-> (DescribeRaidArrays -> Maybe [Text] -> DescribeRaidArrays)
-> Lens
     DescribeRaidArrays DescribeRaidArrays (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRaidArrays' {Maybe [Text]
raidArrayIds :: Maybe [Text]
$sel:raidArrayIds:DescribeRaidArrays' :: DescribeRaidArrays -> Maybe [Text]
raidArrayIds} -> Maybe [Text]
raidArrayIds) (\s :: DescribeRaidArrays
s@DescribeRaidArrays' {} Maybe [Text]
a -> DescribeRaidArrays
s {$sel:raidArrayIds:DescribeRaidArrays' :: Maybe [Text]
raidArrayIds = Maybe [Text]
a} :: DescribeRaidArrays) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeRaidArrays -> f DescribeRaidArrays)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeRaidArrays
-> f DescribeRaidArrays
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 stack ID.
describeRaidArrays_stackId :: Lens.Lens' DescribeRaidArrays (Prelude.Maybe Prelude.Text)
describeRaidArrays_stackId :: (Maybe Text -> f (Maybe Text))
-> DescribeRaidArrays -> f DescribeRaidArrays
describeRaidArrays_stackId = (DescribeRaidArrays -> Maybe Text)
-> (DescribeRaidArrays -> Maybe Text -> DescribeRaidArrays)
-> Lens
     DescribeRaidArrays DescribeRaidArrays (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRaidArrays' {Maybe Text
stackId :: Maybe Text
$sel:stackId:DescribeRaidArrays' :: DescribeRaidArrays -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: DescribeRaidArrays
s@DescribeRaidArrays' {} Maybe Text
a -> DescribeRaidArrays
s {$sel:stackId:DescribeRaidArrays' :: Maybe Text
stackId = Maybe Text
a} :: DescribeRaidArrays)

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

instance Prelude.NFData DescribeRaidArrays

instance Core.ToHeaders DescribeRaidArrays where
  toHeaders :: DescribeRaidArrays -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRaidArrays -> 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.DescribeRaidArrays" ::
                          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 DescribeRaidArrays where
  toJSON :: DescribeRaidArrays -> Value
toJSON DescribeRaidArrays' {Maybe [Text]
Maybe Text
stackId :: Maybe Text
raidArrayIds :: Maybe [Text]
instanceId :: Maybe Text
$sel:stackId:DescribeRaidArrays' :: DescribeRaidArrays -> Maybe Text
$sel:raidArrayIds:DescribeRaidArrays' :: DescribeRaidArrays -> Maybe [Text]
$sel:instanceId:DescribeRaidArrays' :: DescribeRaidArrays -> 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
"RaidArrayIds" 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]
raidArrayIds,
            (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 DescribeRaidArrays where
  toPath :: DescribeRaidArrays -> ByteString
toPath = ByteString -> DescribeRaidArrays -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | Contains the response to a @DescribeRaidArrays@ request.
--
-- /See:/ 'newDescribeRaidArraysResponse' smart constructor.
data DescribeRaidArraysResponse = DescribeRaidArraysResponse'
  { -- | A @RaidArrays@ object that describes the specified RAID arrays.
    DescribeRaidArraysResponse -> Maybe [RaidArray]
raidArrays :: Prelude.Maybe [RaidArray],
    -- | The response's http status code.
    DescribeRaidArraysResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeRaidArraysResponse -> DescribeRaidArraysResponse -> Bool
(DescribeRaidArraysResponse -> DescribeRaidArraysResponse -> Bool)
-> (DescribeRaidArraysResponse
    -> DescribeRaidArraysResponse -> Bool)
-> Eq DescribeRaidArraysResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRaidArraysResponse -> DescribeRaidArraysResponse -> Bool
$c/= :: DescribeRaidArraysResponse -> DescribeRaidArraysResponse -> Bool
== :: DescribeRaidArraysResponse -> DescribeRaidArraysResponse -> Bool
$c== :: DescribeRaidArraysResponse -> DescribeRaidArraysResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRaidArraysResponse]
ReadPrec DescribeRaidArraysResponse
Int -> ReadS DescribeRaidArraysResponse
ReadS [DescribeRaidArraysResponse]
(Int -> ReadS DescribeRaidArraysResponse)
-> ReadS [DescribeRaidArraysResponse]
-> ReadPrec DescribeRaidArraysResponse
-> ReadPrec [DescribeRaidArraysResponse]
-> Read DescribeRaidArraysResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRaidArraysResponse]
$creadListPrec :: ReadPrec [DescribeRaidArraysResponse]
readPrec :: ReadPrec DescribeRaidArraysResponse
$creadPrec :: ReadPrec DescribeRaidArraysResponse
readList :: ReadS [DescribeRaidArraysResponse]
$creadList :: ReadS [DescribeRaidArraysResponse]
readsPrec :: Int -> ReadS DescribeRaidArraysResponse
$creadsPrec :: Int -> ReadS DescribeRaidArraysResponse
Prelude.Read, Int -> DescribeRaidArraysResponse -> ShowS
[DescribeRaidArraysResponse] -> ShowS
DescribeRaidArraysResponse -> String
(Int -> DescribeRaidArraysResponse -> ShowS)
-> (DescribeRaidArraysResponse -> String)
-> ([DescribeRaidArraysResponse] -> ShowS)
-> Show DescribeRaidArraysResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRaidArraysResponse] -> ShowS
$cshowList :: [DescribeRaidArraysResponse] -> ShowS
show :: DescribeRaidArraysResponse -> String
$cshow :: DescribeRaidArraysResponse -> String
showsPrec :: Int -> DescribeRaidArraysResponse -> ShowS
$cshowsPrec :: Int -> DescribeRaidArraysResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRaidArraysResponse -> Rep DescribeRaidArraysResponse x)
-> (forall x.
    Rep DescribeRaidArraysResponse x -> DescribeRaidArraysResponse)
-> Generic DescribeRaidArraysResponse
forall x.
Rep DescribeRaidArraysResponse x -> DescribeRaidArraysResponse
forall x.
DescribeRaidArraysResponse -> Rep DescribeRaidArraysResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRaidArraysResponse x -> DescribeRaidArraysResponse
$cfrom :: forall x.
DescribeRaidArraysResponse -> Rep DescribeRaidArraysResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRaidArraysResponse' 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:
--
-- 'raidArrays', 'describeRaidArraysResponse_raidArrays' - A @RaidArrays@ object that describes the specified RAID arrays.
--
-- 'httpStatus', 'describeRaidArraysResponse_httpStatus' - The response's http status code.
newDescribeRaidArraysResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeRaidArraysResponse
newDescribeRaidArraysResponse :: Int -> DescribeRaidArraysResponse
newDescribeRaidArraysResponse Int
pHttpStatus_ =
  DescribeRaidArraysResponse' :: Maybe [RaidArray] -> Int -> DescribeRaidArraysResponse
DescribeRaidArraysResponse'
    { $sel:raidArrays:DescribeRaidArraysResponse' :: Maybe [RaidArray]
raidArrays =
        Maybe [RaidArray]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeRaidArraysResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A @RaidArrays@ object that describes the specified RAID arrays.
describeRaidArraysResponse_raidArrays :: Lens.Lens' DescribeRaidArraysResponse (Prelude.Maybe [RaidArray])
describeRaidArraysResponse_raidArrays :: (Maybe [RaidArray] -> f (Maybe [RaidArray]))
-> DescribeRaidArraysResponse -> f DescribeRaidArraysResponse
describeRaidArraysResponse_raidArrays = (DescribeRaidArraysResponse -> Maybe [RaidArray])
-> (DescribeRaidArraysResponse
    -> Maybe [RaidArray] -> DescribeRaidArraysResponse)
-> Lens
     DescribeRaidArraysResponse
     DescribeRaidArraysResponse
     (Maybe [RaidArray])
     (Maybe [RaidArray])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRaidArraysResponse' {Maybe [RaidArray]
raidArrays :: Maybe [RaidArray]
$sel:raidArrays:DescribeRaidArraysResponse' :: DescribeRaidArraysResponse -> Maybe [RaidArray]
raidArrays} -> Maybe [RaidArray]
raidArrays) (\s :: DescribeRaidArraysResponse
s@DescribeRaidArraysResponse' {} Maybe [RaidArray]
a -> DescribeRaidArraysResponse
s {$sel:raidArrays:DescribeRaidArraysResponse' :: Maybe [RaidArray]
raidArrays = Maybe [RaidArray]
a} :: DescribeRaidArraysResponse) ((Maybe [RaidArray] -> f (Maybe [RaidArray]))
 -> DescribeRaidArraysResponse -> f DescribeRaidArraysResponse)
-> ((Maybe [RaidArray] -> f (Maybe [RaidArray]))
    -> Maybe [RaidArray] -> f (Maybe [RaidArray]))
-> (Maybe [RaidArray] -> f (Maybe [RaidArray]))
-> DescribeRaidArraysResponse
-> f DescribeRaidArraysResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [RaidArray] [RaidArray] [RaidArray] [RaidArray]
-> Iso
     (Maybe [RaidArray])
     (Maybe [RaidArray])
     (Maybe [RaidArray])
     (Maybe [RaidArray])
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 [RaidArray] [RaidArray] [RaidArray] [RaidArray]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeRaidArraysResponse