{-# 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 #-}
module Amazonka.StorageGateway.CreateStorediSCSIVolume
(
CreateStorediSCSIVolume (..),
newCreateStorediSCSIVolume,
createStorediSCSIVolume_kmsEncrypted,
createStorediSCSIVolume_kmsKey,
createStorediSCSIVolume_snapshotId,
createStorediSCSIVolume_tags,
createStorediSCSIVolume_gatewayARN,
createStorediSCSIVolume_diskId,
createStorediSCSIVolume_preserveExistingData,
createStorediSCSIVolume_targetName,
createStorediSCSIVolume_networkInterfaceId,
CreateStorediSCSIVolumeResponse (..),
newCreateStorediSCSIVolumeResponse,
createStorediSCSIVolumeResponse_targetARN,
createStorediSCSIVolumeResponse_volumeARN,
createStorediSCSIVolumeResponse_volumeSizeInBytes,
createStorediSCSIVolumeResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.StorageGateway.Types
data CreateStorediSCSIVolume = CreateStorediSCSIVolume'
{
CreateStorediSCSIVolume -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
CreateStorediSCSIVolume -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
CreateStorediSCSIVolume -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
CreateStorediSCSIVolume -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateStorediSCSIVolume -> Text
gatewayARN :: Prelude.Text,
CreateStorediSCSIVolume -> Text
diskId :: Prelude.Text,
CreateStorediSCSIVolume -> Bool
preserveExistingData :: Prelude.Bool,
CreateStorediSCSIVolume -> Text
targetName :: Prelude.Text,
CreateStorediSCSIVolume -> Text
networkInterfaceId :: Prelude.Text
}
deriving (CreateStorediSCSIVolume -> CreateStorediSCSIVolume -> Bool
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]
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
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. 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)
newCreateStorediSCSIVolume ::
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
Prelude.Text ->
Prelude.Text ->
CreateStorediSCSIVolume
newCreateStorediSCSIVolume :: Text -> Text -> Bool -> Text -> Text -> CreateStorediSCSIVolume
newCreateStorediSCSIVolume
Text
pGatewayARN_
Text
pDiskId_
Bool
pPreserveExistingData_
Text
pTargetName_
Text
pNetworkInterfaceId_ =
CreateStorediSCSIVolume'
{ $sel:kmsEncrypted:CreateStorediSCSIVolume' :: Maybe Bool
kmsEncrypted =
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKey:CreateStorediSCSIVolume' :: Maybe Text
kmsKey = forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:CreateStorediSCSIVolume' :: Maybe Text
snapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateStorediSCSIVolume' :: Maybe [Tag]
tags = 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_
}
createStorediSCSIVolume_kmsEncrypted :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe Prelude.Bool)
createStorediSCSIVolume_kmsEncrypted :: Lens' CreateStorediSCSIVolume (Maybe Bool)
createStorediSCSIVolume_kmsEncrypted = 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)
createStorediSCSIVolume_kmsKey :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe Prelude.Text)
createStorediSCSIVolume_kmsKey :: Lens' CreateStorediSCSIVolume (Maybe Text)
createStorediSCSIVolume_kmsKey = 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)
createStorediSCSIVolume_snapshotId :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe Prelude.Text)
createStorediSCSIVolume_snapshotId :: Lens' CreateStorediSCSIVolume (Maybe Text)
createStorediSCSIVolume_snapshotId = 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)
createStorediSCSIVolume_tags :: Lens.Lens' CreateStorediSCSIVolume (Prelude.Maybe [Tag])
createStorediSCSIVolume_tags :: Lens' CreateStorediSCSIVolume (Maybe [Tag])
createStorediSCSIVolume_tags = 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) 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
createStorediSCSIVolume_gatewayARN :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_gatewayARN :: Lens' CreateStorediSCSIVolume Text
createStorediSCSIVolume_gatewayARN = 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)
createStorediSCSIVolume_diskId :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_diskId :: Lens' CreateStorediSCSIVolume Text
createStorediSCSIVolume_diskId = 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)
createStorediSCSIVolume_preserveExistingData :: Lens.Lens' CreateStorediSCSIVolume Prelude.Bool
createStorediSCSIVolume_preserveExistingData :: Lens' CreateStorediSCSIVolume Bool
createStorediSCSIVolume_preserveExistingData = 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)
createStorediSCSIVolume_targetName :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_targetName :: Lens' CreateStorediSCSIVolume Text
createStorediSCSIVolume_targetName = 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)
createStorediSCSIVolume_networkInterfaceId :: Lens.Lens' CreateStorediSCSIVolume Prelude.Text
createStorediSCSIVolume_networkInterfaceId :: Lens' CreateStorediSCSIVolume Text
createStorediSCSIVolume_networkInterfaceId = 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 :: (Service -> Service)
-> CreateStorediSCSIVolume -> Request CreateStorediSCSIVolume
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateStorediSCSIVolume
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateStorediSCSIVolume)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TargetARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VolumeARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VolumeSizeInBytes")
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 CreateStorediSCSIVolume where
hashWithSalt :: Int -> CreateStorediSCSIVolume -> Int
hashWithSalt Int
_salt CreateStorediSCSIVolume' {Bool
Maybe Bool
Maybe [Tag]
Maybe Text
Text
networkInterfaceId :: Text
targetName :: Text
preserveExistingData :: Bool
diskId :: Text
gatewayARN :: Text
tags :: Maybe [Tag]
snapshotId :: Maybe Text
kmsKey :: Maybe Text
kmsEncrypted :: Maybe Bool
$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:tags:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe [Tag]
$sel:snapshotId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:kmsKey:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:kmsEncrypted:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
kmsEncrypted
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
gatewayARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
diskId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
preserveExistingData
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
targetName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
networkInterfaceId
instance Prelude.NFData CreateStorediSCSIVolume where
rnf :: CreateStorediSCSIVolume -> ()
rnf CreateStorediSCSIVolume' {Bool
Maybe Bool
Maybe [Tag]
Maybe Text
Text
networkInterfaceId :: Text
targetName :: Text
preserveExistingData :: Bool
diskId :: Text
gatewayARN :: Text
tags :: Maybe [Tag]
snapshotId :: Maybe Text
kmsKey :: Maybe Text
kmsEncrypted :: Maybe Bool
$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:tags:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe [Tag]
$sel:snapshotId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:kmsKey:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:kmsEncrypted:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
kmsEncrypted
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
diskId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
preserveExistingData
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
targetName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
networkInterfaceId
instance Data.ToHeaders CreateStorediSCSIVolume where
toHeaders :: CreateStorediSCSIVolume -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"StorageGateway_20130630.CreateStorediSCSIVolume" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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
tags :: Maybe [Tag]
snapshotId :: Maybe Text
kmsKey :: Maybe Text
kmsEncrypted :: Maybe Bool
$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:tags:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe [Tag]
$sel:snapshotId:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:kmsKey:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Text
$sel:kmsEncrypted:CreateStorediSCSIVolume' :: CreateStorediSCSIVolume -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"KMSEncrypted" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
kmsEncrypted,
(Key
"KMSKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKey,
(Key
"SnapshotId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snapshotId,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"GatewayARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
gatewayARN),
forall a. a -> Maybe a
Prelude.Just (Key
"DiskId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
diskId),
forall a. a -> Maybe a
Prelude.Just
( Key
"PreserveExistingData"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
preserveExistingData
),
forall a. a -> Maybe a
Prelude.Just (Key
"TargetName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
targetName),
forall a. a -> Maybe a
Prelude.Just
(Key
"NetworkInterfaceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
networkInterfaceId)
]
)
instance Data.ToPath CreateStorediSCSIVolume where
toPath :: CreateStorediSCSIVolume -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateStorediSCSIVolume where
toQuery :: CreateStorediSCSIVolume -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateStorediSCSIVolumeResponse = CreateStorediSCSIVolumeResponse'
{
CreateStorediSCSIVolumeResponse -> Maybe Text
targetARN :: Prelude.Maybe Prelude.Text,
CreateStorediSCSIVolumeResponse -> Maybe Text
volumeARN :: Prelude.Maybe Prelude.Text,
CreateStorediSCSIVolumeResponse -> Maybe Integer
volumeSizeInBytes :: Prelude.Maybe Prelude.Integer,
CreateStorediSCSIVolumeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateStorediSCSIVolumeResponse
-> CreateStorediSCSIVolumeResponse -> Bool
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]
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
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.
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)
newCreateStorediSCSIVolumeResponse ::
Prelude.Int ->
CreateStorediSCSIVolumeResponse
newCreateStorediSCSIVolumeResponse :: Int -> CreateStorediSCSIVolumeResponse
newCreateStorediSCSIVolumeResponse Int
pHttpStatus_ =
CreateStorediSCSIVolumeResponse'
{ $sel:targetARN:CreateStorediSCSIVolumeResponse' :: Maybe Text
targetARN =
forall a. Maybe a
Prelude.Nothing,
$sel:volumeARN:CreateStorediSCSIVolumeResponse' :: Maybe Text
volumeARN = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSizeInBytes:CreateStorediSCSIVolumeResponse' :: Maybe Integer
volumeSizeInBytes = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateStorediSCSIVolumeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createStorediSCSIVolumeResponse_targetARN :: Lens.Lens' CreateStorediSCSIVolumeResponse (Prelude.Maybe Prelude.Text)
createStorediSCSIVolumeResponse_targetARN :: Lens' CreateStorediSCSIVolumeResponse (Maybe Text)
createStorediSCSIVolumeResponse_targetARN = 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)
createStorediSCSIVolumeResponse_volumeARN :: Lens.Lens' CreateStorediSCSIVolumeResponse (Prelude.Maybe Prelude.Text)
createStorediSCSIVolumeResponse_volumeARN :: Lens' CreateStorediSCSIVolumeResponse (Maybe Text)
createStorediSCSIVolumeResponse_volumeARN = 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)
createStorediSCSIVolumeResponse_volumeSizeInBytes :: Lens.Lens' CreateStorediSCSIVolumeResponse (Prelude.Maybe Prelude.Integer)
createStorediSCSIVolumeResponse_volumeSizeInBytes :: Lens' CreateStorediSCSIVolumeResponse (Maybe Integer)
createStorediSCSIVolumeResponse_volumeSizeInBytes = 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)
createStorediSCSIVolumeResponse_httpStatus :: Lens.Lens' CreateStorediSCSIVolumeResponse Prelude.Int
createStorediSCSIVolumeResponse_httpStatus :: Lens' CreateStorediSCSIVolumeResponse Int
createStorediSCSIVolumeResponse_httpStatus = 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
where
rnf :: CreateStorediSCSIVolumeResponse -> ()
rnf CreateStorediSCSIVolumeResponse' {Int
Maybe Integer
Maybe Text
httpStatus :: Int
volumeSizeInBytes :: Maybe Integer
volumeARN :: Maybe Text
targetARN :: Maybe Text
$sel:httpStatus:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Int
$sel:volumeSizeInBytes:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Maybe Integer
$sel:volumeARN:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Maybe Text
$sel:targetARN:CreateStorediSCSIVolumeResponse' :: CreateStorediSCSIVolumeResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
volumeSizeInBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus