{-# 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.CreateCachediSCSIVolume
-- 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 cached volume on a specified cached volume gateway. This
-- operation is only supported in the cached volume gateway type.
--
-- Cache storage must be allocated to the gateway before you can create a
-- cached volume. Use the AddCache operation to add cache storage to a
-- gateway.
--
-- In the request, you must specify the gateway, size of the volume in
-- bytes, the iSCSI target name, an IP address on which to expose the
-- target, and a unique client token. In response, the gateway creates the
-- volume and returns information about it. This information includes the
-- volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN
-- that initiators can use to connect to the volume target.
--
-- Optionally, you can provide the ARN for an existing volume as the
-- @SourceVolumeARN@ for this cached volume, which creates an exact copy of
-- the existing volume’s latest recovery point. The @VolumeSizeInBytes@
-- value must be equal to or larger than the size of the copied volume, in
-- bytes.
module Amazonka.StorageGateway.CreateCachediSCSIVolume
  ( -- * Creating a Request
    CreateCachediSCSIVolume (..),
    newCreateCachediSCSIVolume,

    -- * Request Lenses
    createCachediSCSIVolume_kmsKey,
    createCachediSCSIVolume_sourceVolumeARN,
    createCachediSCSIVolume_kmsEncrypted,
    createCachediSCSIVolume_tags,
    createCachediSCSIVolume_snapshotId,
    createCachediSCSIVolume_gatewayARN,
    createCachediSCSIVolume_volumeSizeInBytes,
    createCachediSCSIVolume_targetName,
    createCachediSCSIVolume_networkInterfaceId,
    createCachediSCSIVolume_clientToken,

    -- * Destructuring the Response
    CreateCachediSCSIVolumeResponse (..),
    newCreateCachediSCSIVolumeResponse,

    -- * Response Lenses
    createCachediSCSIVolumeResponse_targetARN,
    createCachediSCSIVolumeResponse_volumeARN,
    createCachediSCSIVolumeResponse_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

-- | /See:/ 'newCreateCachediSCSIVolume' smart constructor.
data CreateCachediSCSIVolume = CreateCachediSCSIVolume'
  { -- | 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.
    CreateCachediSCSIVolume -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
    -- | The ARN for an existing volume. Specifying this ARN makes the new volume
    -- into an exact copy of the specified existing volume\'s latest recovery
    -- point. The @VolumeSizeInBytes@ value for this new volume must be equal
    -- to or larger than the size of the existing volume, in bytes.
    CreateCachediSCSIVolume -> Maybe Text
sourceVolumeARN :: 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@
    CreateCachediSCSIVolume -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | A list of up to 50 tags that you can assign to a cached volume. Each tag
    -- is a key-value pair.
    --
    -- Valid characters for key and value are letters, spaces, and numbers that
    -- you can represent 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 characters.
    CreateCachediSCSIVolume -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The snapshot ID (e.g. \"snap-1122aabb\") of the snapshot to restore as
    -- the new cached 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/.
    CreateCachediSCSIVolume -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
    CreateCachediSCSIVolume -> Text
gatewayARN :: Prelude.Text,
    -- | The size of the volume in bytes.
    CreateCachediSCSIVolume -> Integer
volumeSizeInBytes :: Prelude.Integer,
    -- | 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.
    CreateCachediSCSIVolume -> 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.
    CreateCachediSCSIVolume -> Text
networkInterfaceId :: Prelude.Text,
    -- | A unique identifier that you use to retry a request. If you retry a
    -- request, use the same @ClientToken@ you specified in the initial
    -- request.
    CreateCachediSCSIVolume -> Text
clientToken :: Prelude.Text
  }
  deriving (CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool
(CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool)
-> (CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool)
-> Eq CreateCachediSCSIVolume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool
$c/= :: CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool
== :: CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool
$c== :: CreateCachediSCSIVolume -> CreateCachediSCSIVolume -> Bool
Prelude.Eq, ReadPrec [CreateCachediSCSIVolume]
ReadPrec CreateCachediSCSIVolume
Int -> ReadS CreateCachediSCSIVolume
ReadS [CreateCachediSCSIVolume]
(Int -> ReadS CreateCachediSCSIVolume)
-> ReadS [CreateCachediSCSIVolume]
-> ReadPrec CreateCachediSCSIVolume
-> ReadPrec [CreateCachediSCSIVolume]
-> Read CreateCachediSCSIVolume
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCachediSCSIVolume]
$creadListPrec :: ReadPrec [CreateCachediSCSIVolume]
readPrec :: ReadPrec CreateCachediSCSIVolume
$creadPrec :: ReadPrec CreateCachediSCSIVolume
readList :: ReadS [CreateCachediSCSIVolume]
$creadList :: ReadS [CreateCachediSCSIVolume]
readsPrec :: Int -> ReadS CreateCachediSCSIVolume
$creadsPrec :: Int -> ReadS CreateCachediSCSIVolume
Prelude.Read, Int -> CreateCachediSCSIVolume -> ShowS
[CreateCachediSCSIVolume] -> ShowS
CreateCachediSCSIVolume -> String
(Int -> CreateCachediSCSIVolume -> ShowS)
-> (CreateCachediSCSIVolume -> String)
-> ([CreateCachediSCSIVolume] -> ShowS)
-> Show CreateCachediSCSIVolume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCachediSCSIVolume] -> ShowS
$cshowList :: [CreateCachediSCSIVolume] -> ShowS
show :: CreateCachediSCSIVolume -> String
$cshow :: CreateCachediSCSIVolume -> String
showsPrec :: Int -> CreateCachediSCSIVolume -> ShowS
$cshowsPrec :: Int -> CreateCachediSCSIVolume -> ShowS
Prelude.Show, (forall x.
 CreateCachediSCSIVolume -> Rep CreateCachediSCSIVolume x)
-> (forall x.
    Rep CreateCachediSCSIVolume x -> CreateCachediSCSIVolume)
-> Generic CreateCachediSCSIVolume
forall x. Rep CreateCachediSCSIVolume x -> CreateCachediSCSIVolume
forall x. CreateCachediSCSIVolume -> Rep CreateCachediSCSIVolume x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCachediSCSIVolume x -> CreateCachediSCSIVolume
$cfrom :: forall x. CreateCachediSCSIVolume -> Rep CreateCachediSCSIVolume x
Prelude.Generic)

-- |
-- Create a value of 'CreateCachediSCSIVolume' 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', 'createCachediSCSIVolume_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.
--
-- 'sourceVolumeARN', 'createCachediSCSIVolume_sourceVolumeARN' - The ARN for an existing volume. Specifying this ARN makes the new volume
-- into an exact copy of the specified existing volume\'s latest recovery
-- point. The @VolumeSizeInBytes@ value for this new volume must be equal
-- to or larger than the size of the existing volume, in bytes.
--
-- 'kmsEncrypted', 'createCachediSCSIVolume_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', 'createCachediSCSIVolume_tags' - A list of up to 50 tags that you can assign to a cached volume. Each tag
-- is a key-value pair.
--
-- Valid characters for key and value are letters, spaces, and numbers that
-- you can represent 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 characters.
--
-- 'snapshotId', 'createCachediSCSIVolume_snapshotId' - The snapshot ID (e.g. \"snap-1122aabb\") of the snapshot to restore as
-- the new cached 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', 'createCachediSCSIVolume_gatewayARN' - Undocumented member.
--
-- 'volumeSizeInBytes', 'createCachediSCSIVolume_volumeSizeInBytes' - The size of the volume in bytes.
--
-- 'targetName', 'createCachediSCSIVolume_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', 'createCachediSCSIVolume_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.
--
-- 'clientToken', 'createCachediSCSIVolume_clientToken' - A unique identifier that you use to retry a request. If you retry a
-- request, use the same @ClientToken@ you specified in the initial
-- request.
newCreateCachediSCSIVolume ::
  -- | 'gatewayARN'
  Prelude.Text ->
  -- | 'volumeSizeInBytes'
  Prelude.Integer ->
  -- | 'targetName'
  Prelude.Text ->
  -- | 'networkInterfaceId'
  Prelude.Text ->
  -- | 'clientToken'
  Prelude.Text ->
  CreateCachediSCSIVolume
newCreateCachediSCSIVolume :: Text -> Integer -> Text -> Text -> Text -> CreateCachediSCSIVolume
newCreateCachediSCSIVolume
  Text
pGatewayARN_
  Integer
pVolumeSizeInBytes_
  Text
pTargetName_
  Text
pNetworkInterfaceId_
  Text
pClientToken_ =
    CreateCachediSCSIVolume' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Integer
-> Text
-> Text
-> Text
-> CreateCachediSCSIVolume
CreateCachediSCSIVolume'
      { $sel:kmsKey:CreateCachediSCSIVolume' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:sourceVolumeARN:CreateCachediSCSIVolume' :: Maybe Text
sourceVolumeARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsEncrypted:CreateCachediSCSIVolume' :: Maybe Bool
kmsEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateCachediSCSIVolume' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotId:CreateCachediSCSIVolume' :: Maybe Text
snapshotId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:gatewayARN:CreateCachediSCSIVolume' :: Text
gatewayARN = Text
pGatewayARN_,
        $sel:volumeSizeInBytes:CreateCachediSCSIVolume' :: Integer
volumeSizeInBytes = Integer
pVolumeSizeInBytes_,
        $sel:targetName:CreateCachediSCSIVolume' :: Text
targetName = Text
pTargetName_,
        $sel:networkInterfaceId:CreateCachediSCSIVolume' :: Text
networkInterfaceId = Text
pNetworkInterfaceId_,
        $sel:clientToken:CreateCachediSCSIVolume' :: Text
clientToken = Text
pClientToken_
      }

-- | 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.
createCachediSCSIVolume_kmsKey :: Lens.Lens' CreateCachediSCSIVolume (Prelude.Maybe Prelude.Text)
createCachediSCSIVolume_kmsKey :: (Maybe Text -> f (Maybe Text))
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_kmsKey = (CreateCachediSCSIVolume -> Maybe Text)
-> (CreateCachediSCSIVolume
    -> Maybe Text -> CreateCachediSCSIVolume)
-> Lens
     CreateCachediSCSIVolume
     CreateCachediSCSIVolume
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Maybe Text
a -> CreateCachediSCSIVolume
s {$sel:kmsKey:CreateCachediSCSIVolume' :: Maybe Text
kmsKey = Maybe Text
a} :: CreateCachediSCSIVolume)

-- | The ARN for an existing volume. Specifying this ARN makes the new volume
-- into an exact copy of the specified existing volume\'s latest recovery
-- point. The @VolumeSizeInBytes@ value for this new volume must be equal
-- to or larger than the size of the existing volume, in bytes.
createCachediSCSIVolume_sourceVolumeARN :: Lens.Lens' CreateCachediSCSIVolume (Prelude.Maybe Prelude.Text)
createCachediSCSIVolume_sourceVolumeARN :: (Maybe Text -> f (Maybe Text))
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_sourceVolumeARN = (CreateCachediSCSIVolume -> Maybe Text)
-> (CreateCachediSCSIVolume
    -> Maybe Text -> CreateCachediSCSIVolume)
-> Lens
     CreateCachediSCSIVolume
     CreateCachediSCSIVolume
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Maybe Text
sourceVolumeARN :: Maybe Text
$sel:sourceVolumeARN:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Text
sourceVolumeARN} -> Maybe Text
sourceVolumeARN) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Maybe Text
a -> CreateCachediSCSIVolume
s {$sel:sourceVolumeARN:CreateCachediSCSIVolume' :: Maybe Text
sourceVolumeARN = Maybe Text
a} :: CreateCachediSCSIVolume)

-- | 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@
createCachediSCSIVolume_kmsEncrypted :: Lens.Lens' CreateCachediSCSIVolume (Prelude.Maybe Prelude.Bool)
createCachediSCSIVolume_kmsEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_kmsEncrypted = (CreateCachediSCSIVolume -> Maybe Bool)
-> (CreateCachediSCSIVolume
    -> Maybe Bool -> CreateCachediSCSIVolume)
-> Lens
     CreateCachediSCSIVolume
     CreateCachediSCSIVolume
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Maybe Bool
kmsEncrypted :: Maybe Bool
$sel:kmsEncrypted:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Bool
kmsEncrypted} -> Maybe Bool
kmsEncrypted) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Maybe Bool
a -> CreateCachediSCSIVolume
s {$sel:kmsEncrypted:CreateCachediSCSIVolume' :: Maybe Bool
kmsEncrypted = Maybe Bool
a} :: CreateCachediSCSIVolume)

-- | A list of up to 50 tags that you can assign to a cached volume. Each tag
-- is a key-value pair.
--
-- Valid characters for key and value are letters, spaces, and numbers that
-- you can represent 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 characters.
createCachediSCSIVolume_tags :: Lens.Lens' CreateCachediSCSIVolume (Prelude.Maybe [Tag])
createCachediSCSIVolume_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_tags = (CreateCachediSCSIVolume -> Maybe [Tag])
-> (CreateCachediSCSIVolume
    -> Maybe [Tag] -> CreateCachediSCSIVolume)
-> Lens
     CreateCachediSCSIVolume
     CreateCachediSCSIVolume
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Maybe [Tag]
a -> CreateCachediSCSIVolume
s {$sel:tags:CreateCachediSCSIVolume' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCachediSCSIVolume) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCachediSCSIVolume
-> f CreateCachediSCSIVolume
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 cached 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/.
createCachediSCSIVolume_snapshotId :: Lens.Lens' CreateCachediSCSIVolume (Prelude.Maybe Prelude.Text)
createCachediSCSIVolume_snapshotId :: (Maybe Text -> f (Maybe Text))
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_snapshotId = (CreateCachediSCSIVolume -> Maybe Text)
-> (CreateCachediSCSIVolume
    -> Maybe Text -> CreateCachediSCSIVolume)
-> Lens
     CreateCachediSCSIVolume
     CreateCachediSCSIVolume
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Maybe Text
a -> CreateCachediSCSIVolume
s {$sel:snapshotId:CreateCachediSCSIVolume' :: Maybe Text
snapshotId = Maybe Text
a} :: CreateCachediSCSIVolume)

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

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

-- | 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.
createCachediSCSIVolume_targetName :: Lens.Lens' CreateCachediSCSIVolume Prelude.Text
createCachediSCSIVolume_targetName :: (Text -> f Text)
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_targetName = (CreateCachediSCSIVolume -> Text)
-> (CreateCachediSCSIVolume -> Text -> CreateCachediSCSIVolume)
-> Lens CreateCachediSCSIVolume CreateCachediSCSIVolume Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Text
targetName :: Text
$sel:targetName:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
targetName} -> Text
targetName) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Text
a -> CreateCachediSCSIVolume
s {$sel:targetName:CreateCachediSCSIVolume' :: Text
targetName = Text
a} :: CreateCachediSCSIVolume)

-- | 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.
createCachediSCSIVolume_networkInterfaceId :: Lens.Lens' CreateCachediSCSIVolume Prelude.Text
createCachediSCSIVolume_networkInterfaceId :: (Text -> f Text)
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_networkInterfaceId = (CreateCachediSCSIVolume -> Text)
-> (CreateCachediSCSIVolume -> Text -> CreateCachediSCSIVolume)
-> Lens CreateCachediSCSIVolume CreateCachediSCSIVolume Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Text
networkInterfaceId :: Text
$sel:networkInterfaceId:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
networkInterfaceId} -> Text
networkInterfaceId) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Text
a -> CreateCachediSCSIVolume
s {$sel:networkInterfaceId:CreateCachediSCSIVolume' :: Text
networkInterfaceId = Text
a} :: CreateCachediSCSIVolume)

-- | A unique identifier that you use to retry a request. If you retry a
-- request, use the same @ClientToken@ you specified in the initial
-- request.
createCachediSCSIVolume_clientToken :: Lens.Lens' CreateCachediSCSIVolume Prelude.Text
createCachediSCSIVolume_clientToken :: (Text -> f Text)
-> CreateCachediSCSIVolume -> f CreateCachediSCSIVolume
createCachediSCSIVolume_clientToken = (CreateCachediSCSIVolume -> Text)
-> (CreateCachediSCSIVolume -> Text -> CreateCachediSCSIVolume)
-> Lens CreateCachediSCSIVolume CreateCachediSCSIVolume Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolume' {Text
clientToken :: Text
$sel:clientToken:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
clientToken} -> Text
clientToken) (\s :: CreateCachediSCSIVolume
s@CreateCachediSCSIVolume' {} Text
a -> CreateCachediSCSIVolume
s {$sel:clientToken:CreateCachediSCSIVolume' :: Text
clientToken = Text
a} :: CreateCachediSCSIVolume)

instance Core.AWSRequest CreateCachediSCSIVolume where
  type
    AWSResponse CreateCachediSCSIVolume =
      CreateCachediSCSIVolumeResponse
  request :: CreateCachediSCSIVolume -> Request CreateCachediSCSIVolume
request = Service
-> CreateCachediSCSIVolume -> Request CreateCachediSCSIVolume
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateCachediSCSIVolume
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCachediSCSIVolume)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateCachediSCSIVolume))
-> Logger
-> Service
-> Proxy CreateCachediSCSIVolume
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCachediSCSIVolume)))
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 -> Int -> CreateCachediSCSIVolumeResponse
CreateCachediSCSIVolumeResponse'
            (Maybe Text
 -> Maybe Text -> Int -> CreateCachediSCSIVolumeResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> CreateCachediSCSIVolumeResponse)
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 -> Int -> CreateCachediSCSIVolumeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateCachediSCSIVolumeResponse)
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 (Int -> CreateCachediSCSIVolumeResponse)
-> Either String Int
-> Either String CreateCachediSCSIVolumeResponse
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 CreateCachediSCSIVolume

instance Prelude.NFData CreateCachediSCSIVolume

instance Core.ToHeaders CreateCachediSCSIVolume where
  toHeaders :: CreateCachediSCSIVolume -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateCachediSCSIVolume -> 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.CreateCachediSCSIVolume" ::
                          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 CreateCachediSCSIVolume where
  toJSON :: CreateCachediSCSIVolume -> Value
toJSON CreateCachediSCSIVolume' {Integer
Maybe Bool
Maybe [Tag]
Maybe Text
Text
clientToken :: Text
networkInterfaceId :: Text
targetName :: Text
volumeSizeInBytes :: Integer
gatewayARN :: Text
snapshotId :: Maybe Text
tags :: Maybe [Tag]
kmsEncrypted :: Maybe Bool
sourceVolumeARN :: Maybe Text
kmsKey :: Maybe Text
$sel:clientToken:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
$sel:networkInterfaceId:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
$sel:targetName:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
$sel:volumeSizeInBytes:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Integer
$sel:gatewayARN:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Text
$sel:snapshotId:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Text
$sel:tags:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe [Tag]
$sel:kmsEncrypted:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Bool
$sel:sourceVolumeARN:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> Maybe Text
$sel:kmsKey:CreateCachediSCSIVolume' :: CreateCachediSCSIVolume -> 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
"SourceVolumeARN" 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
sourceVolumeARN,
            (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
"VolumeSizeInBytes" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Integer
volumeSizeInBytes),
            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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateCachediSCSIVolumeResponse' 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', 'createCachediSCSIVolumeResponse_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', 'createCachediSCSIVolumeResponse_volumeARN' - The Amazon Resource Name (ARN) of the configured volume.
--
-- 'httpStatus', 'createCachediSCSIVolumeResponse_httpStatus' - The response's http status code.
newCreateCachediSCSIVolumeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateCachediSCSIVolumeResponse
newCreateCachediSCSIVolumeResponse :: Int -> CreateCachediSCSIVolumeResponse
newCreateCachediSCSIVolumeResponse Int
pHttpStatus_ =
  CreateCachediSCSIVolumeResponse' :: Maybe Text -> Maybe Text -> Int -> CreateCachediSCSIVolumeResponse
CreateCachediSCSIVolumeResponse'
    { $sel:targetARN:CreateCachediSCSIVolumeResponse' :: Maybe Text
targetARN =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeARN:CreateCachediSCSIVolumeResponse' :: Maybe Text
volumeARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateCachediSCSIVolumeResponse' :: 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.
createCachediSCSIVolumeResponse_targetARN :: Lens.Lens' CreateCachediSCSIVolumeResponse (Prelude.Maybe Prelude.Text)
createCachediSCSIVolumeResponse_targetARN :: (Maybe Text -> f (Maybe Text))
-> CreateCachediSCSIVolumeResponse
-> f CreateCachediSCSIVolumeResponse
createCachediSCSIVolumeResponse_targetARN = (CreateCachediSCSIVolumeResponse -> Maybe Text)
-> (CreateCachediSCSIVolumeResponse
    -> Maybe Text -> CreateCachediSCSIVolumeResponse)
-> Lens
     CreateCachediSCSIVolumeResponse
     CreateCachediSCSIVolumeResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCachediSCSIVolumeResponse' {Maybe Text
targetARN :: Maybe Text
$sel:targetARN:CreateCachediSCSIVolumeResponse' :: CreateCachediSCSIVolumeResponse -> Maybe Text
targetARN} -> Maybe Text
targetARN) (\s :: CreateCachediSCSIVolumeResponse
s@CreateCachediSCSIVolumeResponse' {} Maybe Text
a -> CreateCachediSCSIVolumeResponse
s {$sel:targetARN:CreateCachediSCSIVolumeResponse' :: Maybe Text
targetARN = Maybe Text
a} :: CreateCachediSCSIVolumeResponse)

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

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

instance
  Prelude.NFData
    CreateCachediSCSIVolumeResponse