{-# 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.CreateStorediSCSIVolume
-- 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)
--
-- Creates a volume on a specified gateway. This operation is only
-- supported in the stored volume gateway type.
--
-- The size of the volume to create is inferred from the disk size. You can
-- choose to preserve existing data on the disk, create volume from an
-- existing snapshot, or create an empty volume. If you choose to create an
-- empty gateway volume, then any existing data on the disk is erased.
--
-- In the request, you must specify the gateway and the disk information on
-- which you are creating the volume. In response, the gateway creates the
-- volume and returns volume information such as the volume Amazon Resource
-- Name (ARN), its size, and the iSCSI target ARN that initiators can use
-- to connect to the volume target.
module Amazonka.StorageGateway.CreateStorediSCSIVolume
  ( -- * Creating a Request
    CreateStorediSCSIVolume (..),
    newCreateStorediSCSIVolume,

    -- * Request Lenses
    createStorediSCSIVolume_kmsKey,
    createStorediSCSIVolume_kmsEncrypted,
    createStorediSCSIVolume_tags,
    createStorediSCSIVolume_snapshotId,
    createStorediSCSIVolume_gatewayARN,
    createStorediSCSIVolume_diskId,
    createStorediSCSIVolume_preserveExistingData,
    createStorediSCSIVolume_targetName,
    createStorediSCSIVolume_networkInterfaceId,

    -- * Destructuring the Response
    CreateStorediSCSIVolumeResponse (..),
    newCreateStorediSCSIVolumeResponse,

    -- * Response Lenses
    createStorediSCSIVolumeResponse_targetARN,
    createStorediSCSIVolumeResponse_volumeARN,
    createStorediSCSIVolumeResponse_volumeSizeInBytes,
    createStorediSCSIVolumeResponse_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 one or more of the following fields:
--
-- -   CreateStorediSCSIVolumeInput$DiskId
--
-- -   CreateStorediSCSIVolumeInput$NetworkInterfaceId
--
-- -   CreateStorediSCSIVolumeInput$PreserveExistingData
--
-- -   CreateStorediSCSIVolumeInput$SnapshotId
--
-- -   CreateStorediSCSIVolumeInput$TargetName
--
-- /See:/ 'newCreateStorediSCSIVolume' smart constructor.
data CreateStorediSCSIVolume = CreateStorediSCSIVolume'
  { -- | The Amazon Resource Name (ARN) of a symmetric customer master key (CMK)
    -- used for Amazon S3 server-side encryption. Storage Gateway does not
    -- support asymmetric CMKs. This value can only be set when @KMSEncrypted@
    -- is @true@. Optional.
    CreateStorediSCSIVolume -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | Set to @true@ to use Amazon S3 server-side encryption with your own KMS
    -- key, or @false@ to use a key managed by Amazon S3. Optional.
    --
    -- Valid Values: @true@ | @false@
    CreateStorediSCSIVolume -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | A list of up to 50 tags that can be assigned to a stored volume. Each
    -- tag is a key-value pair.
    --
    -- Valid characters for key and value are letters, spaces, and numbers
    -- representable in UTF-8 format, and the following special characters: + -
    -- = . _ : \/ \@. The maximum length of a tag\'s key is 128 characters, and
    -- the maximum length for a tag\'s value is 256.
    CreateStorediSCSIVolume -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The snapshot ID (e.g., \"snap-1122aabb\") of the snapshot to restore as
    -- the new stored volume. Specify this field if you want to create the
    -- iSCSI storage volume from a snapshot; otherwise, do not include this
    -- field. To list snapshots for your account use
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html DescribeSnapshots>
    -- in the /Amazon Elastic Compute Cloud API Reference/.
    CreateStorediSCSIVolume -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
    CreateStorediSCSIVolume -> Text
gatewayARN :: Prelude.Text,
    -- | The unique identifier for the gateway local disk that is configured as a
    -- stored volume. Use
    -- <https://docs.aws.amazon.com/storagegateway/latest/userguide/API_ListLocalDisks.html ListLocalDisks>
    -- to list disk IDs for a gateway.
    CreateStorediSCSIVolume -> Text
diskId :: Prelude.Text,
    -- | Set to @true@ if you want to preserve the data on the local disk.
    -- Otherwise, set to @false@ to create an empty volume.
    --
    -- Valid Values: @true@ | @false@
    CreateStorediSCSIVolume -> Bool
preserveExistingData :: Prelude.Bool,
    -- | The name of the iSCSI target used by an initiator to connect to a volume
    -- and used as a suffix for the target ARN. For example, specifying
    -- @TargetName@ as /myvolume/ results in the target ARN of
    -- @arn:aws:storagegateway:us-east-2:111122223333:gateway\/sgw-12A3456B\/target\/iqn.1997-05.com.amazon:myvolume@.
    -- The target name must be unique across all volumes on a gateway.
    --
    -- If you don\'t specify a value, Storage Gateway uses the value that was
    -- previously used for this volume as the new target name.
    CreateStorediSCSIVolume -> Text
targetName :: Prelude.Text,
    -- | The network interface of the gateway on which to expose the iSCSI
    -- target. Only IPv4 addresses are accepted. Use DescribeGatewayInformation
    -- to get a list of the network interfaces available on a gateway.
    --
    -- Valid Values: A valid IP address.
    CreateStorediSCSIVolume -> Text
networkInterfaceId :: Prelude.Text
  }
  deriving (CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool
(CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool)
-> (CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool)
-> Eq CreateStorediSCSIVolume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool
$c/= :: CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool
== :: CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool
$c== :: CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool
Prelude.Eq, ReadPrec [CreateStorediSCSIVolume]
ReadPrec CreateStorediSCSIVolume
Int -> ReadS CreateStorediSCSIVolume
ReadS [CreateStorediSCSIVolume]
(Int -> ReadS CreateStorediSCSIVolume)
-> ReadS [CreateStorediSCSIVolume]
-> ReadPrec CreateStorediSCSIVolume
-> ReadPrec [CreateStorediSCSIVolume]
-> Read CreateStorediSCSIVolume
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStorediSCSIVolume]
$creadListPrec :: ReadPrec [CreateStorediSCSIVolume]
readPrec :: ReadPrec CreateStorediSCSIVolume
$creadPrec :: ReadPrec CreateStorediSCSIVolume
readList :: ReadS [CreateStorediSCSIVolume]
$creadList :: ReadS [CreateStorediSCSIVolume]
readsPrec :: Int -> ReadS CreateStorediSCSIVolume
$creadsPrec :: Int -> ReadS CreateStorediSCSIVolume
Prelude.Read, Int -> CreateStorediSCSIVolume -> ShowS
[CreateStorediSCSIVolume] -> ShowS
CreateStorediSCSIVolume -> String
(Int -> CreateStorediSCSIVolume -> ShowS)
-> (CreateStorediSCSIVolume -> String)
-> ([CreateStorediSCSIVolume] -> ShowS)
-> Show CreateStorediSCSIVolume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStorediSCSIVolume] -> ShowS
$cshowList :: [CreateStorediSCSIVolume] -> ShowS
show :: CreateStorediSCSIVolume -> String
$cshow :: CreateStorediSCSIVolume -> String
showsPrec :: Int -> CreateStorediSCSIVolume -> ShowS
$cshowsPrec :: Int -> CreateStorediSCSIVolume -> ShowS
Prelude.Show, (forall x.
 CreateStorediSCSIVolume -> Rep CreateStorediSCSIVolume x)
-> (forall x.
    Rep CreateStorediSCSIVolume x -> CreateStorediSCSIVolume)
-> Generic CreateStorediSCSIVolume
forall x. Rep CreateStorediSCSIVolume x -> CreateStorediSCSIVolume
forall x. CreateStorediSCSIVolume -> Rep CreateStorediSCSIVolume x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateStorediSCSIVolume x -> CreateStorediSCSIVolume
$cfrom :: forall x. CreateStorediSCSIVolume -> Rep CreateStorediSCSIVolume x
Prelude.Generic)

-- |
-- Create a value of 'CreateStorediSCSIVolume' 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:
--
-- 'kmsKey', 'createStorediSCSIVolume_kmsKey' - The Amazon Resource Name (ARN) of a symmetric customer master key (CMK)
-- used for Amazon S3 server-side encryption. Storage Gateway does not
-- support asymmetric CMKs. This value can only be set when @KMSEncrypted@
-- is @true@. Optional.
--
-- 'kmsEncrypted', 'createStorediSCSIVolume_kmsEncrypted' - Set to @true@ to use Amazon S3 server-side encryption with your own KMS
-- key, or @false@ to use a key managed by Amazon S3. Optional.
--
-- Valid Values: @true@ | @false@
--
-- 'tags', 'createStorediSCSIVolume_tags' - A list of up to 50 tags that can be assigned to a stored volume. Each
-- tag is a key-value pair.
--
-- Valid characters for key and value are letters, spaces, and numbers
-- representable in UTF-8 format, and the following special characters: + -
-- = . _ : \/ \@. The maximum length of a tag\'s key is 128 characters, and
-- the maximum length for a tag\'s value is 256.
--
-- 'snapshotId', 'createStorediSCSIVolume_snapshotId' - The snapshot ID (e.g., \"snap-1122aabb\") of the snapshot to restore as
-- the new stored volume. Specify this field if you want to create the
-- iSCSI storage volume from a snapshot; otherwise, do not include this
-- field. To list snapshots for your account use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html DescribeSnapshots>
-- in the /Amazon Elastic Compute Cloud API Reference/.
--
-- 'gatewayARN', 'createStorediSCSIVolume_gatewayARN' - Undocumented member.
--
-- 'diskId', 'createStorediSCSIVolume_diskId' - The unique identifier for the gateway local disk that is configured as a
-- stored volume. Use
-- <https://docs.aws.amazon.com/storagegateway/latest/userguide/API_ListLocalDisks.html ListLocalDisks>
-- to list disk IDs for a gateway.
--
-- 'preserveExistingData', 'createStorediSCSIVolume_preserveExistingData' - Set to @true@ if you want to preserve the data on the local disk.
-- Otherwise, set to @false@ to create an empty volume.
--
-- Valid Values: @true@ | @false@
--
-- 'targetName', 'createStorediSCSIVolume_targetName' - The name of the iSCSI target used by an initiator to connect to a volume
-- and used as a suffix for the target ARN. For example, specifying
-- @TargetName@ as /myvolume/ results in the target ARN of
-- @arn:aws:storagegateway:us-east-2:111122223333:gateway\/sgw-12A3456B\/target\/iqn.1997-05.com.amazon:myvolume@.
-- The target name must be unique across all volumes on a gateway.
--
-- If you don\'t specify a value, Storage Gateway uses the value that was
-- previously used for this volume as the new target name.
--
-- 'networkInterfaceId', 'createStorediSCSIVolume_networkInterfaceId' - The network interface of the gateway on which to expose the iSCSI
-- target. Only IPv4 addresses are accepted. Use DescribeGatewayInformation
-- to get a list of the network interfaces available on a gateway.
--
-- Valid Values: A valid IP address.
newCreateStorediSCSIVolume ::
  -- | 'gatewayARN'
  Prelude.Text ->
  -- | 'diskId'
  Prelude.Text ->
  -- | 'preserveExistingData'
  Prelude.Bool ->
  -- | 'targetName'
  Prelude.Text ->
  -- | 'networkInterfaceId'
  Prelude.Text ->
  CreateStorediSCSIVolume
newCreateStorediSCSIVolume :: Text -> Text -> Bool -> Text -> Text -> CreateStorediSCSIVolume
newCreateStorediSCSIVolume
  Text
pGatewayARN_
  Text
pDiskId_
  Bool
pPreserveExistingData_
  Text
pTargetName_
  Text
pNetworkInterfaceId_ =
    CreateStorediSCSIVolume' :: Maybe Text
-> Maybe Bool
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Text
-> Bool
-> Text
-> Text
-> CreateStorediSCSIVolume
CreateStorediSCSIVolume'
      { $sel:kmsKey:CreateStorediSCSIVolume' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsEncrypted:CreateStorediSCSIVolume' :: Maybe Bool
kmsEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateStorediSCSIVolume' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotId:CreateStorediSCSIVolume' :: Maybe Text
snapshotId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:gatewayARN:CreateStorediSCSIVolume' :: Text
gatewayARN = Text
pGatewayARN_,
        $sel:diskId:CreateStorediSCSIVolume' :: Text
diskId = Text
pDiskId_,
        $sel:preserveExistingData:CreateStorediSCSIVolume' :: Bool
preserveExistingData = Bool
pPreserveExistingData_,
        $sel:targetName:CreateStorediSCSIVolume' :: Text
targetName = Text
pTargetName_,
        $sel:networkInterfaceId:CreateStorediSCSIVolume' :: Text
networkInterfaceId = Text
pNetworkInterfaceId_
      }

-- | The Amazon Resource Name (ARN) of a symmetric customer master key (CMK)
-- used for Amazon S3 server-side encryption. Storage Gateway does not
-- support asymmetric CMKs. This value can only be set when @KMSEncrypted@
-- is @true@. Optional.
createStorediSCSIVolume_kmsKey :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe Prelude.Text)
createStorediSCSIVolume_kmsKey :: (Maybe Text -> f (Maybe Text))
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_kmsKey = (CreateStorediSCSIVolume -> Maybe Text)
-> (CreateStorediSCSIVolume
    -> Maybe Text -> CreateStorediSCSIVolume)
-> Lens
     CreateStorediSCSIVolume
     CreateStorediSCSIVolume
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Maybe Text
a -> CreateStorediSCSIVolume
s {$sel:kmsKey:CreateStorediSCSIVolume' :: Maybe Text
kmsKey = Maybe Text
a} :: CreateStorediSCSIVolume)

-- | Set to @true@ to use Amazon S3 server-side encryption with your own KMS
-- key, or @false@ to use a key managed by Amazon S3. Optional.
--
-- Valid Values: @true@ | @false@
createStorediSCSIVolume_kmsEncrypted :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe Prelude.Bool)
createStorediSCSIVolume_kmsEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_kmsEncrypted = (CreateStorediSCSIVolume -> Maybe Bool)
-> (CreateStorediSCSIVolume
    -> Maybe Bool -> CreateStorediSCSIVolume)
-> Lens
     CreateStorediSCSIVolume
     CreateStorediSCSIVolume
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Maybe Bool
kmsEncrypted :: Maybe Bool
$sel:kmsEncrypted:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Bool
kmsEncrypted} -> Maybe Bool
kmsEncrypted) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Maybe Bool
a -> CreateStorediSCSIVolume
s {$sel:kmsEncrypted:CreateStorediSCSIVolume' :: Maybe Bool
kmsEncrypted = Maybe Bool
a} :: CreateStorediSCSIVolume)

-- | A list of up to 50 tags that can be assigned to a stored volume. Each
-- tag is a key-value pair.
--
-- Valid characters for key and value are letters, spaces, and numbers
-- representable in UTF-8 format, and the following special characters: + -
-- = . _ : \/ \@. The maximum length of a tag\'s key is 128 characters, and
-- the maximum length for a tag\'s value is 256.
createStorediSCSIVolume_tags :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe [Tag])
createStorediSCSIVolume_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_tags = (CreateStorediSCSIVolume -> Maybe [Tag])
-> (CreateStorediSCSIVolume
    -> Maybe [Tag] -> CreateStorediSCSIVolume)
-> Lens
     CreateStorediSCSIVolume
     CreateStorediSCSIVolume
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Maybe [Tag]
a -> CreateStorediSCSIVolume
s {$sel:tags:CreateStorediSCSIVolume' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateStorediSCSIVolume) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateStorediSCSIVolume
-> f CreateStorediSCSIVolume
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The snapshot ID (e.g., \"snap-1122aabb\") of the snapshot to restore as
-- the new stored volume. Specify this field if you want to create the
-- iSCSI storage volume from a snapshot; otherwise, do not include this
-- field. To list snapshots for your account use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html DescribeSnapshots>
-- in the /Amazon Elastic Compute Cloud API Reference/.
createStorediSCSIVolume_snapshotId :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe Prelude.Text)
createStorediSCSIVolume_snapshotId :: (Maybe Text -> f (Maybe Text))
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_snapshotId = (CreateStorediSCSIVolume -> Maybe Text)
-> (CreateStorediSCSIVolume
    -> Maybe Text -> CreateStorediSCSIVolume)
-> Lens
     CreateStorediSCSIVolume
     CreateStorediSCSIVolume
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Maybe Text
a -> CreateStorediSCSIVolume
s {$sel:snapshotId:CreateStorediSCSIVolume' :: Maybe Text
snapshotId = Maybe Text
a} :: CreateStorediSCSIVolume)

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

-- | The unique identifier for the gateway local disk that is configured as a
-- stored volume. Use
-- <https://docs.aws.amazon.com/storagegateway/latest/userguide/API_ListLocalDisks.html ListLocalDisks>
-- to list disk IDs for a gateway.
createStorediSCSIVolume_diskId :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_diskId :: (Text -> f Text)
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_diskId = (CreateStorediSCSIVolume -> Text)
-> (CreateStorediSCSIVolume -> Text -> CreateStorediSCSIVolume)
-> Lens CreateStorediSCSIVolume CreateStorediSCSIVolume Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Text
diskId :: Text
$sel:diskId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
diskId} -> Text
diskId) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Text
a -> CreateStorediSCSIVolume
s {$sel:diskId:CreateStorediSCSIVolume' :: Text
diskId = Text
a} :: CreateStorediSCSIVolume)

-- | Set to @true@ if you want to preserve the data on the local disk.
-- Otherwise, set to @false@ to create an empty volume.
--
-- Valid Values: @true@ | @false@
createStorediSCSIVolume_preserveExistingData :: Lens.Lens' CreateStorediSCSIVolume Prelude.Bool
createStorediSCSIVolume_preserveExistingData :: (Bool -> f Bool)
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_preserveExistingData = (CreateStorediSCSIVolume -> Bool)
-> (CreateStorediSCSIVolume -> Bool -> CreateStorediSCSIVolume)
-> Lens CreateStorediSCSIVolume CreateStorediSCSIVolume Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Bool
preserveExistingData :: Bool
$sel:preserveExistingData:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Bool
preserveExistingData} -> Bool
preserveExistingData) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Bool
a -> CreateStorediSCSIVolume
s {$sel:preserveExistingData:CreateStorediSCSIVolume' :: Bool
preserveExistingData = Bool
a} :: CreateStorediSCSIVolume)

-- | The name of the iSCSI target used by an initiator to connect to a volume
-- and used as a suffix for the target ARN. For example, specifying
-- @TargetName@ as /myvolume/ results in the target ARN of
-- @arn:aws:storagegateway:us-east-2:111122223333:gateway\/sgw-12A3456B\/target\/iqn.1997-05.com.amazon:myvolume@.
-- The target name must be unique across all volumes on a gateway.
--
-- If you don\'t specify a value, Storage Gateway uses the value that was
-- previously used for this volume as the new target name.
createStorediSCSIVolume_targetName :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_targetName :: (Text -> f Text)
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_targetName = (CreateStorediSCSIVolume -> Text)
-> (CreateStorediSCSIVolume -> Text -> CreateStorediSCSIVolume)
-> Lens CreateStorediSCSIVolume CreateStorediSCSIVolume Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Text
targetName :: Text
$sel:targetName:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
targetName} -> Text
targetName) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Text
a -> CreateStorediSCSIVolume
s {$sel:targetName:CreateStorediSCSIVolume' :: Text
targetName = Text
a} :: CreateStorediSCSIVolume)

-- | The network interface of the gateway on which to expose the iSCSI
-- target. Only IPv4 addresses are accepted. Use DescribeGatewayInformation
-- to get a list of the network interfaces available on a gateway.
--
-- Valid Values: A valid IP address.
createStorediSCSIVolume_networkInterfaceId :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_networkInterfaceId :: (Text -> f Text)
-> CreateStorediSCSIVolume -> f CreateStorediSCSIVolume
createStorediSCSIVolume_networkInterfaceId = (CreateStorediSCSIVolume -> Text)
-> (CreateStorediSCSIVolume -> Text -> CreateStorediSCSIVolume)
-> Lens CreateStorediSCSIVolume CreateStorediSCSIVolume Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolume' {Text
networkInterfaceId :: Text
$sel:networkInterfaceId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
networkInterfaceId} -> Text
networkInterfaceId) (\s :: CreateStorediSCSIVolume
s@CreateStorediSCSIVolume' {} Text
a -> CreateStorediSCSIVolume
s {$sel:networkInterfaceId:CreateStorediSCSIVolume' :: Text
networkInterfaceId = Text
a} :: CreateStorediSCSIVolume)

instance Core.AWSRequest CreateStorediSCSIVolume where
  type
    AWSResponse CreateStorediSCSIVolume =
      CreateStorediSCSIVolumeResponse
  request :: CreateStorediSCSIVolume -> Request CreateStorediSCSIVolume
request = Service
-> CreateStorediSCSIVolume -> Request CreateStorediSCSIVolume
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateStorediSCSIVolume
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateStorediSCSIVolume)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateStorediSCSIVolume))
-> Logger
-> Service
-> Proxy CreateStorediSCSIVolume
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateStorediSCSIVolume)))
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 Text
-> Maybe Text
-> Maybe Integer
-> Int
-> CreateStorediSCSIVolumeResponse
CreateStorediSCSIVolumeResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Int
 -> CreateStorediSCSIVolumeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer -> Int -> CreateStorediSCSIVolumeResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TargetARN")
            Either
  String
  (Maybe Text
   -> Maybe Integer -> Int -> CreateStorediSCSIVolumeResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Integer -> Int -> CreateStorediSCSIVolumeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VolumeARN")
            Either
  String (Maybe Integer -> Int -> CreateStorediSCSIVolumeResponse)
-> Either String (Maybe Integer)
-> Either String (Int -> CreateStorediSCSIVolumeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VolumeSizeInBytes")
            Either String (Int -> CreateStorediSCSIVolumeResponse)
-> Either String Int
-> Either String CreateStorediSCSIVolumeResponse
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 CreateStorediSCSIVolume

instance Prelude.NFData CreateStorediSCSIVolume

instance Core.ToHeaders CreateStorediSCSIVolume where
  toHeaders :: CreateStorediSCSIVolume -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateStorediSCSIVolume -> 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.CreateStorediSCSIVolume" ::
                          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 CreateStorediSCSIVolume where
  toJSON :: CreateStorediSCSIVolume -> Value
toJSON CreateStorediSCSIVolume' {Bool
Maybe Bool
Maybe [Tag]
Maybe Text
Text
networkInterfaceId :: Text
targetName :: Text
preserveExistingData :: Bool
diskId :: Text
gatewayARN :: Text
snapshotId :: Maybe Text
tags :: Maybe [Tag]
kmsEncrypted :: Maybe Bool
kmsKey :: Maybe Text
$sel:networkInterfaceId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
$sel:targetName:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
$sel:preserveExistingData:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Bool
$sel:diskId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
$sel:gatewayARN:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Text
$sel:snapshotId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:tags:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe [Tag]
$sel:kmsEncrypted:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Bool
$sel:kmsKey:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"KMSKey" 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
kmsKey,
            (Text
"KMSEncrypted" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
kmsEncrypted,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            (Text
"SnapshotId" 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
snapshotId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GatewayARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayARN),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DiskId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
diskId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"PreserveExistingData"
                  Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
preserveExistingData
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TargetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"NetworkInterfaceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
networkInterfaceId)
          ]
      )

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

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

-- | A JSON object containing the following fields:
--
-- /See:/ 'newCreateStorediSCSIVolumeResponse' smart constructor.
data CreateStorediSCSIVolumeResponse = CreateStorediSCSIVolumeResponse'
  { -- | The Amazon Resource Name (ARN) of the volume target, which includes the
    -- iSCSI name that initiators can use to connect to the target.
    CreateStorediSCSIVolumeResponse -> Maybe Text
targetARN :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the configured volume.
    CreateStorediSCSIVolumeResponse -> Maybe Text
volumeARN :: Prelude.Maybe Prelude.Text,
    -- | The size of the volume in bytes.
    CreateStorediSCSIVolumeResponse -> Maybe Integer
volumeSizeInBytes :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    CreateStorediSCSIVolumeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateStorediSCSIVolumeResponse
-> CreateStorediSCSIVolumeResponse -> Bool
(CreateStorediSCSIVolumeResponse
 -> CreateStorediSCSIVolumeResponse -> Bool)
-> (CreateStorediSCSIVolumeResponse
    -> CreateStorediSCSIVolumeResponse -> Bool)
-> Eq CreateStorediSCSIVolumeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateStorediSCSIVolumeResponse
-> CreateStorediSCSIVolumeResponse -> Bool
$c/= :: CreateStorediSCSIVolumeResponse
-> CreateStorediSCSIVolumeResponse -> Bool
== :: CreateStorediSCSIVolumeResponse
-> CreateStorediSCSIVolumeResponse -> Bool
$c== :: CreateStorediSCSIVolumeResponse
-> CreateStorediSCSIVolumeResponse -> Bool
Prelude.Eq, ReadPrec [CreateStorediSCSIVolumeResponse]
ReadPrec CreateStorediSCSIVolumeResponse
Int -> ReadS CreateStorediSCSIVolumeResponse
ReadS [CreateStorediSCSIVolumeResponse]
(Int -> ReadS CreateStorediSCSIVolumeResponse)
-> ReadS [CreateStorediSCSIVolumeResponse]
-> ReadPrec CreateStorediSCSIVolumeResponse
-> ReadPrec [CreateStorediSCSIVolumeResponse]
-> Read CreateStorediSCSIVolumeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateStorediSCSIVolumeResponse]
$creadListPrec :: ReadPrec [CreateStorediSCSIVolumeResponse]
readPrec :: ReadPrec CreateStorediSCSIVolumeResponse
$creadPrec :: ReadPrec CreateStorediSCSIVolumeResponse
readList :: ReadS [CreateStorediSCSIVolumeResponse]
$creadList :: ReadS [CreateStorediSCSIVolumeResponse]
readsPrec :: Int -> ReadS CreateStorediSCSIVolumeResponse
$creadsPrec :: Int -> ReadS CreateStorediSCSIVolumeResponse
Prelude.Read, Int -> CreateStorediSCSIVolumeResponse -> ShowS
[CreateStorediSCSIVolumeResponse] -> ShowS
CreateStorediSCSIVolumeResponse -> String
(Int -> CreateStorediSCSIVolumeResponse -> ShowS)
-> (CreateStorediSCSIVolumeResponse -> String)
-> ([CreateStorediSCSIVolumeResponse] -> ShowS)
-> Show CreateStorediSCSIVolumeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateStorediSCSIVolumeResponse] -> ShowS
$cshowList :: [CreateStorediSCSIVolumeResponse] -> ShowS
show :: CreateStorediSCSIVolumeResponse -> String
$cshow :: CreateStorediSCSIVolumeResponse -> String
showsPrec :: Int -> CreateStorediSCSIVolumeResponse -> ShowS
$cshowsPrec :: Int -> CreateStorediSCSIVolumeResponse -> ShowS
Prelude.Show, (forall x.
 CreateStorediSCSIVolumeResponse
 -> Rep CreateStorediSCSIVolumeResponse x)
-> (forall x.
    Rep CreateStorediSCSIVolumeResponse x
    -> CreateStorediSCSIVolumeResponse)
-> Generic CreateStorediSCSIVolumeResponse
forall x.
Rep CreateStorediSCSIVolumeResponse x
-> CreateStorediSCSIVolumeResponse
forall x.
CreateStorediSCSIVolumeResponse
-> Rep CreateStorediSCSIVolumeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateStorediSCSIVolumeResponse x
-> CreateStorediSCSIVolumeResponse
$cfrom :: forall x.
CreateStorediSCSIVolumeResponse
-> Rep CreateStorediSCSIVolumeResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateStorediSCSIVolumeResponse' 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:
--
-- 'targetARN', 'createStorediSCSIVolumeResponse_targetARN' - The Amazon Resource Name (ARN) of the volume target, which includes the
-- iSCSI name that initiators can use to connect to the target.
--
-- 'volumeARN', 'createStorediSCSIVolumeResponse_volumeARN' - The Amazon Resource Name (ARN) of the configured volume.
--
-- 'volumeSizeInBytes', 'createStorediSCSIVolumeResponse_volumeSizeInBytes' - The size of the volume in bytes.
--
-- 'httpStatus', 'createStorediSCSIVolumeResponse_httpStatus' - The response's http status code.
newCreateStorediSCSIVolumeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateStorediSCSIVolumeResponse
newCreateStorediSCSIVolumeResponse :: Int -> CreateStorediSCSIVolumeResponse
newCreateStorediSCSIVolumeResponse Int
pHttpStatus_ =
  CreateStorediSCSIVolumeResponse' :: Maybe Text
-> Maybe Text
-> Maybe Integer
-> Int
-> CreateStorediSCSIVolumeResponse
CreateStorediSCSIVolumeResponse'
    { $sel:targetARN:CreateStorediSCSIVolumeResponse' :: Maybe Text
targetARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeARN:CreateStorediSCSIVolumeResponse' :: Maybe Text
volumeARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeSizeInBytes:CreateStorediSCSIVolumeResponse' :: Maybe Integer
volumeSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateStorediSCSIVolumeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the volume target, which includes the
-- iSCSI name that initiators can use to connect to the target.
createStorediSCSIVolumeResponse_targetARN :: Lens.Lens' CreateStorediSCSIVolumeResponse (Prelude.Maybe Prelude.Text)
createStorediSCSIVolumeResponse_targetARN :: (Maybe Text -> f (Maybe Text))
-> CreateStorediSCSIVolumeResponse
-> f CreateStorediSCSIVolumeResponse
createStorediSCSIVolumeResponse_targetARN = (CreateStorediSCSIVolumeResponse -> Maybe Text)
-> (CreateStorediSCSIVolumeResponse
    -> Maybe Text -> CreateStorediSCSIVolumeResponse)
-> Lens
     CreateStorediSCSIVolumeResponse
     CreateStorediSCSIVolumeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolumeResponse' {Maybe Text
targetARN :: Maybe Text
$sel:targetARN:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Maybe Text
targetARN} -> Maybe Text
targetARN) (\s :: CreateStorediSCSIVolumeResponse
s@CreateStorediSCSIVolumeResponse' {} Maybe Text
a -> CreateStorediSCSIVolumeResponse
s {$sel:targetARN:CreateStorediSCSIVolumeResponse' :: Maybe Text
targetARN = Maybe Text
a} :: CreateStorediSCSIVolumeResponse)

-- | The Amazon Resource Name (ARN) of the configured volume.
createStorediSCSIVolumeResponse_volumeARN :: Lens.Lens' CreateStorediSCSIVolumeResponse (Prelude.Maybe Prelude.Text)
createStorediSCSIVolumeResponse_volumeARN :: (Maybe Text -> f (Maybe Text))
-> CreateStorediSCSIVolumeResponse
-> f CreateStorediSCSIVolumeResponse
createStorediSCSIVolumeResponse_volumeARN = (CreateStorediSCSIVolumeResponse -> Maybe Text)
-> (CreateStorediSCSIVolumeResponse
    -> Maybe Text -> CreateStorediSCSIVolumeResponse)
-> Lens
     CreateStorediSCSIVolumeResponse
     CreateStorediSCSIVolumeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolumeResponse' {Maybe Text
volumeARN :: Maybe Text
$sel:volumeARN:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Maybe Text
volumeARN} -> Maybe Text
volumeARN) (\s :: CreateStorediSCSIVolumeResponse
s@CreateStorediSCSIVolumeResponse' {} Maybe Text
a -> CreateStorediSCSIVolumeResponse
s {$sel:volumeARN:CreateStorediSCSIVolumeResponse' :: Maybe Text
volumeARN = Maybe Text
a} :: CreateStorediSCSIVolumeResponse)

-- | The size of the volume in bytes.
createStorediSCSIVolumeResponse_volumeSizeInBytes :: Lens.Lens' CreateStorediSCSIVolumeResponse (Prelude.Maybe Prelude.Integer)
createStorediSCSIVolumeResponse_volumeSizeInBytes :: (Maybe Integer -> f (Maybe Integer))
-> CreateStorediSCSIVolumeResponse
-> f CreateStorediSCSIVolumeResponse
createStorediSCSIVolumeResponse_volumeSizeInBytes = (CreateStorediSCSIVolumeResponse -> Maybe Integer)
-> (CreateStorediSCSIVolumeResponse
    -> Maybe Integer -> CreateStorediSCSIVolumeResponse)
-> Lens
     CreateStorediSCSIVolumeResponse
     CreateStorediSCSIVolumeResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateStorediSCSIVolumeResponse' {Maybe Integer
volumeSizeInBytes :: Maybe Integer
$sel:volumeSizeInBytes:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Maybe Integer
volumeSizeInBytes} -> Maybe Integer
volumeSizeInBytes) (\s :: CreateStorediSCSIVolumeResponse
s@CreateStorediSCSIVolumeResponse' {} Maybe Integer
a -> CreateStorediSCSIVolumeResponse
s {$sel:volumeSizeInBytes:CreateStorediSCSIVolumeResponse' :: Maybe Integer
volumeSizeInBytes = Maybe Integer
a} :: CreateStorediSCSIVolumeResponse)

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

instance
  Prelude.NFData
    CreateStorediSCSIVolumeResponse