{-# 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.EC2.DescribeVolumeAttribute
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified attribute of the specified volume. You can
-- specify only one attribute at a time.
--
-- For more information about EBS volumes, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html Amazon EBS volumes>
-- in the /Amazon Elastic Compute Cloud User Guide/.
module Amazonka.EC2.DescribeVolumeAttribute
  ( -- * Creating a Request
    DescribeVolumeAttribute (..),
    newDescribeVolumeAttribute,

    -- * Request Lenses
    describeVolumeAttribute_dryRun,
    describeVolumeAttribute_attribute,
    describeVolumeAttribute_volumeId,

    -- * Destructuring the Response
    DescribeVolumeAttributeResponse (..),
    newDescribeVolumeAttributeResponse,

    -- * Response Lenses
    describeVolumeAttributeResponse_autoEnableIO,
    describeVolumeAttributeResponse_productCodes,
    describeVolumeAttributeResponse_volumeId,
    describeVolumeAttributeResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeVolumeAttribute' smart constructor.
data DescribeVolumeAttribute = DescribeVolumeAttribute'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DescribeVolumeAttribute -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The attribute of the volume. This parameter is required.
    DescribeVolumeAttribute -> VolumeAttributeName
attribute :: VolumeAttributeName,
    -- | The ID of the volume.
    DescribeVolumeAttribute -> Text
volumeId :: Prelude.Text
  }
  deriving (DescribeVolumeAttribute -> DescribeVolumeAttribute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVolumeAttribute -> DescribeVolumeAttribute -> Bool
$c/= :: DescribeVolumeAttribute -> DescribeVolumeAttribute -> Bool
== :: DescribeVolumeAttribute -> DescribeVolumeAttribute -> Bool
$c== :: DescribeVolumeAttribute -> DescribeVolumeAttribute -> Bool
Prelude.Eq, ReadPrec [DescribeVolumeAttribute]
ReadPrec DescribeVolumeAttribute
Int -> ReadS DescribeVolumeAttribute
ReadS [DescribeVolumeAttribute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVolumeAttribute]
$creadListPrec :: ReadPrec [DescribeVolumeAttribute]
readPrec :: ReadPrec DescribeVolumeAttribute
$creadPrec :: ReadPrec DescribeVolumeAttribute
readList :: ReadS [DescribeVolumeAttribute]
$creadList :: ReadS [DescribeVolumeAttribute]
readsPrec :: Int -> ReadS DescribeVolumeAttribute
$creadsPrec :: Int -> ReadS DescribeVolumeAttribute
Prelude.Read, Int -> DescribeVolumeAttribute -> ShowS
[DescribeVolumeAttribute] -> ShowS
DescribeVolumeAttribute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVolumeAttribute] -> ShowS
$cshowList :: [DescribeVolumeAttribute] -> ShowS
show :: DescribeVolumeAttribute -> String
$cshow :: DescribeVolumeAttribute -> String
showsPrec :: Int -> DescribeVolumeAttribute -> ShowS
$cshowsPrec :: Int -> DescribeVolumeAttribute -> ShowS
Prelude.Show, forall x. Rep DescribeVolumeAttribute x -> DescribeVolumeAttribute
forall x. DescribeVolumeAttribute -> Rep DescribeVolumeAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeVolumeAttribute x -> DescribeVolumeAttribute
$cfrom :: forall x. DescribeVolumeAttribute -> Rep DescribeVolumeAttribute x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVolumeAttribute' 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:
--
-- 'dryRun', 'describeVolumeAttribute_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'attribute', 'describeVolumeAttribute_attribute' - The attribute of the volume. This parameter is required.
--
-- 'volumeId', 'describeVolumeAttribute_volumeId' - The ID of the volume.
newDescribeVolumeAttribute ::
  -- | 'attribute'
  VolumeAttributeName ->
  -- | 'volumeId'
  Prelude.Text ->
  DescribeVolumeAttribute
newDescribeVolumeAttribute :: VolumeAttributeName -> Text -> DescribeVolumeAttribute
newDescribeVolumeAttribute VolumeAttributeName
pAttribute_ Text
pVolumeId_ =
  DescribeVolumeAttribute'
    { $sel:dryRun:DescribeVolumeAttribute' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:attribute:DescribeVolumeAttribute' :: VolumeAttributeName
attribute = VolumeAttributeName
pAttribute_,
      $sel:volumeId:DescribeVolumeAttribute' :: Text
volumeId = Text
pVolumeId_
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
describeVolumeAttribute_dryRun :: Lens.Lens' DescribeVolumeAttribute (Prelude.Maybe Prelude.Bool)
describeVolumeAttribute_dryRun :: Lens' DescribeVolumeAttribute (Maybe Bool)
describeVolumeAttribute_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumeAttribute' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeVolumeAttribute
s@DescribeVolumeAttribute' {} Maybe Bool
a -> DescribeVolumeAttribute
s {$sel:dryRun:DescribeVolumeAttribute' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeVolumeAttribute)

-- | The attribute of the volume. This parameter is required.
describeVolumeAttribute_attribute :: Lens.Lens' DescribeVolumeAttribute VolumeAttributeName
describeVolumeAttribute_attribute :: Lens' DescribeVolumeAttribute VolumeAttributeName
describeVolumeAttribute_attribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumeAttribute' {VolumeAttributeName
attribute :: VolumeAttributeName
$sel:attribute:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> VolumeAttributeName
attribute} -> VolumeAttributeName
attribute) (\s :: DescribeVolumeAttribute
s@DescribeVolumeAttribute' {} VolumeAttributeName
a -> DescribeVolumeAttribute
s {$sel:attribute:DescribeVolumeAttribute' :: VolumeAttributeName
attribute = VolumeAttributeName
a} :: DescribeVolumeAttribute)

-- | The ID of the volume.
describeVolumeAttribute_volumeId :: Lens.Lens' DescribeVolumeAttribute Prelude.Text
describeVolumeAttribute_volumeId :: Lens' DescribeVolumeAttribute Text
describeVolumeAttribute_volumeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumeAttribute' {Text
volumeId :: Text
$sel:volumeId:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Text
volumeId} -> Text
volumeId) (\s :: DescribeVolumeAttribute
s@DescribeVolumeAttribute' {} Text
a -> DescribeVolumeAttribute
s {$sel:volumeId:DescribeVolumeAttribute' :: Text
volumeId = Text
a} :: DescribeVolumeAttribute)

instance Core.AWSRequest DescribeVolumeAttribute where
  type
    AWSResponse DescribeVolumeAttribute =
      DescribeVolumeAttributeResponse
  request :: (Service -> Service)
-> DescribeVolumeAttribute -> Request DescribeVolumeAttribute
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeVolumeAttribute
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeVolumeAttribute)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe AttributeBooleanValue
-> Maybe [ProductCode]
-> Maybe Text
-> Int
-> DescribeVolumeAttributeResponse
DescribeVolumeAttributeResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"autoEnableIO")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"productCodes"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"volumeId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeVolumeAttribute where
  hashWithSalt :: Int -> DescribeVolumeAttribute -> Int
hashWithSalt Int
_salt DescribeVolumeAttribute' {Maybe Bool
Text
VolumeAttributeName
volumeId :: Text
attribute :: VolumeAttributeName
dryRun :: Maybe Bool
$sel:volumeId:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Text
$sel:attribute:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> VolumeAttributeName
$sel:dryRun:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VolumeAttributeName
attribute
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
volumeId

instance Prelude.NFData DescribeVolumeAttribute where
  rnf :: DescribeVolumeAttribute -> ()
rnf DescribeVolumeAttribute' {Maybe Bool
Text
VolumeAttributeName
volumeId :: Text
attribute :: VolumeAttributeName
dryRun :: Maybe Bool
$sel:volumeId:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Text
$sel:attribute:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> VolumeAttributeName
$sel:dryRun:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VolumeAttributeName
attribute
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
volumeId

instance Data.ToHeaders DescribeVolumeAttribute where
  toHeaders :: DescribeVolumeAttribute -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance Data.ToQuery DescribeVolumeAttribute where
  toQuery :: DescribeVolumeAttribute -> QueryString
toQuery DescribeVolumeAttribute' {Maybe Bool
Text
VolumeAttributeName
volumeId :: Text
attribute :: VolumeAttributeName
dryRun :: Maybe Bool
$sel:volumeId:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Text
$sel:attribute:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> VolumeAttributeName
$sel:dryRun:DescribeVolumeAttribute' :: DescribeVolumeAttribute -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeVolumeAttribute" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"Attribute" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: VolumeAttributeName
attribute,
        ByteString
"VolumeId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
volumeId
      ]

-- | /See:/ 'newDescribeVolumeAttributeResponse' smart constructor.
data DescribeVolumeAttributeResponse = DescribeVolumeAttributeResponse'
  { -- | The state of @autoEnableIO@ attribute.
    DescribeVolumeAttributeResponse -> Maybe AttributeBooleanValue
autoEnableIO :: Prelude.Maybe AttributeBooleanValue,
    -- | A list of product codes.
    DescribeVolumeAttributeResponse -> Maybe [ProductCode]
productCodes :: Prelude.Maybe [ProductCode],
    -- | The ID of the volume.
    DescribeVolumeAttributeResponse -> Maybe Text
volumeId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeVolumeAttributeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeVolumeAttributeResponse
-> DescribeVolumeAttributeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVolumeAttributeResponse
-> DescribeVolumeAttributeResponse -> Bool
$c/= :: DescribeVolumeAttributeResponse
-> DescribeVolumeAttributeResponse -> Bool
== :: DescribeVolumeAttributeResponse
-> DescribeVolumeAttributeResponse -> Bool
$c== :: DescribeVolumeAttributeResponse
-> DescribeVolumeAttributeResponse -> Bool
Prelude.Eq, ReadPrec [DescribeVolumeAttributeResponse]
ReadPrec DescribeVolumeAttributeResponse
Int -> ReadS DescribeVolumeAttributeResponse
ReadS [DescribeVolumeAttributeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVolumeAttributeResponse]
$creadListPrec :: ReadPrec [DescribeVolumeAttributeResponse]
readPrec :: ReadPrec DescribeVolumeAttributeResponse
$creadPrec :: ReadPrec DescribeVolumeAttributeResponse
readList :: ReadS [DescribeVolumeAttributeResponse]
$creadList :: ReadS [DescribeVolumeAttributeResponse]
readsPrec :: Int -> ReadS DescribeVolumeAttributeResponse
$creadsPrec :: Int -> ReadS DescribeVolumeAttributeResponse
Prelude.Read, Int -> DescribeVolumeAttributeResponse -> ShowS
[DescribeVolumeAttributeResponse] -> ShowS
DescribeVolumeAttributeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVolumeAttributeResponse] -> ShowS
$cshowList :: [DescribeVolumeAttributeResponse] -> ShowS
show :: DescribeVolumeAttributeResponse -> String
$cshow :: DescribeVolumeAttributeResponse -> String
showsPrec :: Int -> DescribeVolumeAttributeResponse -> ShowS
$cshowsPrec :: Int -> DescribeVolumeAttributeResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeVolumeAttributeResponse x
-> DescribeVolumeAttributeResponse
forall x.
DescribeVolumeAttributeResponse
-> Rep DescribeVolumeAttributeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVolumeAttributeResponse x
-> DescribeVolumeAttributeResponse
$cfrom :: forall x.
DescribeVolumeAttributeResponse
-> Rep DescribeVolumeAttributeResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVolumeAttributeResponse' 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:
--
-- 'autoEnableIO', 'describeVolumeAttributeResponse_autoEnableIO' - The state of @autoEnableIO@ attribute.
--
-- 'productCodes', 'describeVolumeAttributeResponse_productCodes' - A list of product codes.
--
-- 'volumeId', 'describeVolumeAttributeResponse_volumeId' - The ID of the volume.
--
-- 'httpStatus', 'describeVolumeAttributeResponse_httpStatus' - The response's http status code.
newDescribeVolumeAttributeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeVolumeAttributeResponse
newDescribeVolumeAttributeResponse :: Int -> DescribeVolumeAttributeResponse
newDescribeVolumeAttributeResponse Int
pHttpStatus_ =
  DescribeVolumeAttributeResponse'
    { $sel:autoEnableIO:DescribeVolumeAttributeResponse' :: Maybe AttributeBooleanValue
autoEnableIO =
        forall a. Maybe a
Prelude.Nothing,
      $sel:productCodes:DescribeVolumeAttributeResponse' :: Maybe [ProductCode]
productCodes = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeId:DescribeVolumeAttributeResponse' :: Maybe Text
volumeId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeVolumeAttributeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The state of @autoEnableIO@ attribute.
describeVolumeAttributeResponse_autoEnableIO :: Lens.Lens' DescribeVolumeAttributeResponse (Prelude.Maybe AttributeBooleanValue)
describeVolumeAttributeResponse_autoEnableIO :: Lens' DescribeVolumeAttributeResponse (Maybe AttributeBooleanValue)
describeVolumeAttributeResponse_autoEnableIO = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumeAttributeResponse' {Maybe AttributeBooleanValue
autoEnableIO :: Maybe AttributeBooleanValue
$sel:autoEnableIO:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Maybe AttributeBooleanValue
autoEnableIO} -> Maybe AttributeBooleanValue
autoEnableIO) (\s :: DescribeVolumeAttributeResponse
s@DescribeVolumeAttributeResponse' {} Maybe AttributeBooleanValue
a -> DescribeVolumeAttributeResponse
s {$sel:autoEnableIO:DescribeVolumeAttributeResponse' :: Maybe AttributeBooleanValue
autoEnableIO = Maybe AttributeBooleanValue
a} :: DescribeVolumeAttributeResponse)

-- | A list of product codes.
describeVolumeAttributeResponse_productCodes :: Lens.Lens' DescribeVolumeAttributeResponse (Prelude.Maybe [ProductCode])
describeVolumeAttributeResponse_productCodes :: Lens' DescribeVolumeAttributeResponse (Maybe [ProductCode])
describeVolumeAttributeResponse_productCodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumeAttributeResponse' {Maybe [ProductCode]
productCodes :: Maybe [ProductCode]
$sel:productCodes:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Maybe [ProductCode]
productCodes} -> Maybe [ProductCode]
productCodes) (\s :: DescribeVolumeAttributeResponse
s@DescribeVolumeAttributeResponse' {} Maybe [ProductCode]
a -> DescribeVolumeAttributeResponse
s {$sel:productCodes:DescribeVolumeAttributeResponse' :: Maybe [ProductCode]
productCodes = Maybe [ProductCode]
a} :: DescribeVolumeAttributeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the volume.
describeVolumeAttributeResponse_volumeId :: Lens.Lens' DescribeVolumeAttributeResponse (Prelude.Maybe Prelude.Text)
describeVolumeAttributeResponse_volumeId :: Lens' DescribeVolumeAttributeResponse (Maybe Text)
describeVolumeAttributeResponse_volumeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVolumeAttributeResponse' {Maybe Text
volumeId :: Maybe Text
$sel:volumeId:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Maybe Text
volumeId} -> Maybe Text
volumeId) (\s :: DescribeVolumeAttributeResponse
s@DescribeVolumeAttributeResponse' {} Maybe Text
a -> DescribeVolumeAttributeResponse
s {$sel:volumeId:DescribeVolumeAttributeResponse' :: Maybe Text
volumeId = Maybe Text
a} :: DescribeVolumeAttributeResponse)

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

instance
  Prelude.NFData
    DescribeVolumeAttributeResponse
  where
  rnf :: DescribeVolumeAttributeResponse -> ()
rnf DescribeVolumeAttributeResponse' {Int
Maybe [ProductCode]
Maybe Text
Maybe AttributeBooleanValue
httpStatus :: Int
volumeId :: Maybe Text
productCodes :: Maybe [ProductCode]
autoEnableIO :: Maybe AttributeBooleanValue
$sel:httpStatus:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Int
$sel:volumeId:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Maybe Text
$sel:productCodes:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Maybe [ProductCode]
$sel:autoEnableIO:DescribeVolumeAttributeResponse' :: DescribeVolumeAttributeResponse -> Maybe AttributeBooleanValue
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AttributeBooleanValue
autoEnableIO
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProductCode]
productCodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus