{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.StorageGateway.Types.VolumeInfo 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
data VolumeInfo = VolumeInfo'
{ VolumeInfo -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
VolumeInfo -> Maybe Text
gatewayId :: Prelude.Maybe Prelude.Text,
VolumeInfo -> Maybe Text
volumeARN :: Prelude.Maybe Prelude.Text,
VolumeInfo -> Maybe Text
volumeAttachmentStatus :: Prelude.Maybe Prelude.Text,
VolumeInfo -> Maybe Text
volumeId :: Prelude.Maybe Prelude.Text,
VolumeInfo -> Maybe Integer
volumeSizeInBytes :: Prelude.Maybe Prelude.Integer,
VolumeInfo -> Maybe Text
volumeType :: Prelude.Maybe Prelude.Text
}
deriving (VolumeInfo -> VolumeInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeInfo -> VolumeInfo -> Bool
$c/= :: VolumeInfo -> VolumeInfo -> Bool
== :: VolumeInfo -> VolumeInfo -> Bool
$c== :: VolumeInfo -> VolumeInfo -> Bool
Prelude.Eq, ReadPrec [VolumeInfo]
ReadPrec VolumeInfo
Int -> ReadS VolumeInfo
ReadS [VolumeInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeInfo]
$creadListPrec :: ReadPrec [VolumeInfo]
readPrec :: ReadPrec VolumeInfo
$creadPrec :: ReadPrec VolumeInfo
readList :: ReadS [VolumeInfo]
$creadList :: ReadS [VolumeInfo]
readsPrec :: Int -> ReadS VolumeInfo
$creadsPrec :: Int -> ReadS VolumeInfo
Prelude.Read, Int -> VolumeInfo -> ShowS
[VolumeInfo] -> ShowS
VolumeInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeInfo] -> ShowS
$cshowList :: [VolumeInfo] -> ShowS
show :: VolumeInfo -> String
$cshow :: VolumeInfo -> String
showsPrec :: Int -> VolumeInfo -> ShowS
$cshowsPrec :: Int -> VolumeInfo -> ShowS
Prelude.Show, forall x. Rep VolumeInfo x -> VolumeInfo
forall x. VolumeInfo -> Rep VolumeInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeInfo x -> VolumeInfo
$cfrom :: forall x. VolumeInfo -> Rep VolumeInfo x
Prelude.Generic)
newVolumeInfo ::
VolumeInfo
newVolumeInfo :: VolumeInfo
newVolumeInfo =
VolumeInfo'
{ $sel:gatewayARN:VolumeInfo' :: Maybe Text
gatewayARN = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayId:VolumeInfo' :: Maybe Text
gatewayId = forall a. Maybe a
Prelude.Nothing,
$sel:volumeARN:VolumeInfo' :: Maybe Text
volumeARN = forall a. Maybe a
Prelude.Nothing,
$sel:volumeAttachmentStatus:VolumeInfo' :: Maybe Text
volumeAttachmentStatus = forall a. Maybe a
Prelude.Nothing,
$sel:volumeId:VolumeInfo' :: Maybe Text
volumeId = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSizeInBytes:VolumeInfo' :: Maybe Integer
volumeSizeInBytes = forall a. Maybe a
Prelude.Nothing,
$sel:volumeType:VolumeInfo' :: Maybe Text
volumeType = forall a. Maybe a
Prelude.Nothing
}
volumeInfo_gatewayARN :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Text)
volumeInfo_gatewayARN :: Lens' VolumeInfo (Maybe Text)
volumeInfo_gatewayARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:VolumeInfo' :: VolumeInfo -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Text
a -> VolumeInfo
s {$sel:gatewayARN:VolumeInfo' :: Maybe Text
gatewayARN = Maybe Text
a} :: VolumeInfo)
volumeInfo_gatewayId :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Text)
volumeInfo_gatewayId :: Lens' VolumeInfo (Maybe Text)
volumeInfo_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Text
gatewayId :: Maybe Text
$sel:gatewayId:VolumeInfo' :: VolumeInfo -> Maybe Text
gatewayId} -> Maybe Text
gatewayId) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Text
a -> VolumeInfo
s {$sel:gatewayId:VolumeInfo' :: Maybe Text
gatewayId = Maybe Text
a} :: VolumeInfo)
volumeInfo_volumeARN :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Text)
volumeInfo_volumeARN :: Lens' VolumeInfo (Maybe Text)
volumeInfo_volumeARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Text
volumeARN :: Maybe Text
$sel:volumeARN:VolumeInfo' :: VolumeInfo -> Maybe Text
volumeARN} -> Maybe Text
volumeARN) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Text
a -> VolumeInfo
s {$sel:volumeARN:VolumeInfo' :: Maybe Text
volumeARN = Maybe Text
a} :: VolumeInfo)
volumeInfo_volumeAttachmentStatus :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Text)
volumeInfo_volumeAttachmentStatus :: Lens' VolumeInfo (Maybe Text)
volumeInfo_volumeAttachmentStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Text
volumeAttachmentStatus :: Maybe Text
$sel:volumeAttachmentStatus:VolumeInfo' :: VolumeInfo -> Maybe Text
volumeAttachmentStatus} -> Maybe Text
volumeAttachmentStatus) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Text
a -> VolumeInfo
s {$sel:volumeAttachmentStatus:VolumeInfo' :: Maybe Text
volumeAttachmentStatus = Maybe Text
a} :: VolumeInfo)
volumeInfo_volumeId :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Text)
volumeInfo_volumeId :: Lens' VolumeInfo (Maybe Text)
volumeInfo_volumeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Text
volumeId :: Maybe Text
$sel:volumeId:VolumeInfo' :: VolumeInfo -> Maybe Text
volumeId} -> Maybe Text
volumeId) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Text
a -> VolumeInfo
s {$sel:volumeId:VolumeInfo' :: Maybe Text
volumeId = Maybe Text
a} :: VolumeInfo)
volumeInfo_volumeSizeInBytes :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Integer)
volumeInfo_volumeSizeInBytes :: Lens' VolumeInfo (Maybe Integer)
volumeInfo_volumeSizeInBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Integer
volumeSizeInBytes :: Maybe Integer
$sel:volumeSizeInBytes:VolumeInfo' :: VolumeInfo -> Maybe Integer
volumeSizeInBytes} -> Maybe Integer
volumeSizeInBytes) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Integer
a -> VolumeInfo
s {$sel:volumeSizeInBytes:VolumeInfo' :: Maybe Integer
volumeSizeInBytes = Maybe Integer
a} :: VolumeInfo)
volumeInfo_volumeType :: Lens.Lens' VolumeInfo (Prelude.Maybe Prelude.Text)
volumeInfo_volumeType :: Lens' VolumeInfo (Maybe Text)
volumeInfo_volumeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeInfo' {Maybe Text
volumeType :: Maybe Text
$sel:volumeType:VolumeInfo' :: VolumeInfo -> Maybe Text
volumeType} -> Maybe Text
volumeType) (\s :: VolumeInfo
s@VolumeInfo' {} Maybe Text
a -> VolumeInfo
s {$sel:volumeType:VolumeInfo' :: Maybe Text
volumeType = Maybe Text
a} :: VolumeInfo)
instance Data.FromJSON VolumeInfo where
parseJSON :: Value -> Parser VolumeInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VolumeInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> VolumeInfo
VolumeInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GatewayARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GatewayId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"VolumeAttachmentStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VolumeId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VolumeSizeInBytes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VolumeType")
)
instance Prelude.Hashable VolumeInfo where
hashWithSalt :: Int -> VolumeInfo -> Int
hashWithSalt Int
_salt VolumeInfo' {Maybe Integer
Maybe Text
volumeType :: Maybe Text
volumeSizeInBytes :: Maybe Integer
volumeId :: Maybe Text
volumeAttachmentStatus :: Maybe Text
volumeARN :: Maybe Text
gatewayId :: Maybe Text
gatewayARN :: Maybe Text
$sel:volumeType:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:volumeSizeInBytes:VolumeInfo' :: VolumeInfo -> Maybe Integer
$sel:volumeId:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:volumeAttachmentStatus:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:volumeARN:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:gatewayId:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:gatewayARN:VolumeInfo' :: VolumeInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeAttachmentStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
volumeSizeInBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeType
instance Prelude.NFData VolumeInfo where
rnf :: VolumeInfo -> ()
rnf VolumeInfo' {Maybe Integer
Maybe Text
volumeType :: Maybe Text
volumeSizeInBytes :: Maybe Integer
volumeId :: Maybe Text
volumeAttachmentStatus :: Maybe Text
volumeARN :: Maybe Text
gatewayId :: Maybe Text
gatewayARN :: Maybe Text
$sel:volumeType:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:volumeSizeInBytes:VolumeInfo' :: VolumeInfo -> Maybe Integer
$sel:volumeId:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:volumeAttachmentStatus:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:volumeARN:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:gatewayId:VolumeInfo' :: VolumeInfo -> Maybe Text
$sel:gatewayARN:VolumeInfo' :: VolumeInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayId
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 Text
volumeAttachmentStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
volumeSizeInBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeType