{-# 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.VTLDevice 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 Amazonka.StorageGateway.Types.DeviceiSCSIAttributes
data VTLDevice = VTLDevice'
{
VTLDevice -> Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes :: Prelude.Maybe DeviceiSCSIAttributes,
VTLDevice -> Maybe Text
vTLDeviceARN :: Prelude.Maybe Prelude.Text,
VTLDevice -> Maybe Text
vTLDeviceProductIdentifier :: Prelude.Maybe Prelude.Text,
VTLDevice -> Maybe Text
vTLDeviceType :: Prelude.Maybe Prelude.Text,
VTLDevice -> Maybe Text
vTLDeviceVendor :: Prelude.Maybe Prelude.Text
}
deriving (VTLDevice -> VTLDevice -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VTLDevice -> VTLDevice -> Bool
$c/= :: VTLDevice -> VTLDevice -> Bool
== :: VTLDevice -> VTLDevice -> Bool
$c== :: VTLDevice -> VTLDevice -> Bool
Prelude.Eq, ReadPrec [VTLDevice]
ReadPrec VTLDevice
Int -> ReadS VTLDevice
ReadS [VTLDevice]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VTLDevice]
$creadListPrec :: ReadPrec [VTLDevice]
readPrec :: ReadPrec VTLDevice
$creadPrec :: ReadPrec VTLDevice
readList :: ReadS [VTLDevice]
$creadList :: ReadS [VTLDevice]
readsPrec :: Int -> ReadS VTLDevice
$creadsPrec :: Int -> ReadS VTLDevice
Prelude.Read, Int -> VTLDevice -> ShowS
[VTLDevice] -> ShowS
VTLDevice -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VTLDevice] -> ShowS
$cshowList :: [VTLDevice] -> ShowS
show :: VTLDevice -> String
$cshow :: VTLDevice -> String
showsPrec :: Int -> VTLDevice -> ShowS
$cshowsPrec :: Int -> VTLDevice -> ShowS
Prelude.Show, forall x. Rep VTLDevice x -> VTLDevice
forall x. VTLDevice -> Rep VTLDevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VTLDevice x -> VTLDevice
$cfrom :: forall x. VTLDevice -> Rep VTLDevice x
Prelude.Generic)
newVTLDevice ::
VTLDevice
newVTLDevice :: VTLDevice
newVTLDevice =
VTLDevice'
{ $sel:deviceiSCSIAttributes:VTLDevice' :: Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes = forall a. Maybe a
Prelude.Nothing,
$sel:vTLDeviceARN:VTLDevice' :: Maybe Text
vTLDeviceARN = forall a. Maybe a
Prelude.Nothing,
$sel:vTLDeviceProductIdentifier:VTLDevice' :: Maybe Text
vTLDeviceProductIdentifier = forall a. Maybe a
Prelude.Nothing,
$sel:vTLDeviceType:VTLDevice' :: Maybe Text
vTLDeviceType = forall a. Maybe a
Prelude.Nothing,
$sel:vTLDeviceVendor:VTLDevice' :: Maybe Text
vTLDeviceVendor = forall a. Maybe a
Prelude.Nothing
}
vTLDevice_deviceiSCSIAttributes :: Lens.Lens' VTLDevice (Prelude.Maybe DeviceiSCSIAttributes)
vTLDevice_deviceiSCSIAttributes :: Lens' VTLDevice (Maybe DeviceiSCSIAttributes)
vTLDevice_deviceiSCSIAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VTLDevice' {Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes :: Maybe DeviceiSCSIAttributes
$sel:deviceiSCSIAttributes:VTLDevice' :: VTLDevice -> Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes} -> Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes) (\s :: VTLDevice
s@VTLDevice' {} Maybe DeviceiSCSIAttributes
a -> VTLDevice
s {$sel:deviceiSCSIAttributes:VTLDevice' :: Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes = Maybe DeviceiSCSIAttributes
a} :: VTLDevice)
vTLDevice_vTLDeviceARN :: Lens.Lens' VTLDevice (Prelude.Maybe Prelude.Text)
vTLDevice_vTLDeviceARN :: Lens' VTLDevice (Maybe Text)
vTLDevice_vTLDeviceARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VTLDevice' {Maybe Text
vTLDeviceARN :: Maybe Text
$sel:vTLDeviceARN:VTLDevice' :: VTLDevice -> Maybe Text
vTLDeviceARN} -> Maybe Text
vTLDeviceARN) (\s :: VTLDevice
s@VTLDevice' {} Maybe Text
a -> VTLDevice
s {$sel:vTLDeviceARN:VTLDevice' :: Maybe Text
vTLDeviceARN = Maybe Text
a} :: VTLDevice)
vTLDevice_vTLDeviceProductIdentifier :: Lens.Lens' VTLDevice (Prelude.Maybe Prelude.Text)
vTLDevice_vTLDeviceProductIdentifier :: Lens' VTLDevice (Maybe Text)
vTLDevice_vTLDeviceProductIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VTLDevice' {Maybe Text
vTLDeviceProductIdentifier :: Maybe Text
$sel:vTLDeviceProductIdentifier:VTLDevice' :: VTLDevice -> Maybe Text
vTLDeviceProductIdentifier} -> Maybe Text
vTLDeviceProductIdentifier) (\s :: VTLDevice
s@VTLDevice' {} Maybe Text
a -> VTLDevice
s {$sel:vTLDeviceProductIdentifier:VTLDevice' :: Maybe Text
vTLDeviceProductIdentifier = Maybe Text
a} :: VTLDevice)
vTLDevice_vTLDeviceType :: Lens.Lens' VTLDevice (Prelude.Maybe Prelude.Text)
vTLDevice_vTLDeviceType :: Lens' VTLDevice (Maybe Text)
vTLDevice_vTLDeviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VTLDevice' {Maybe Text
vTLDeviceType :: Maybe Text
$sel:vTLDeviceType:VTLDevice' :: VTLDevice -> Maybe Text
vTLDeviceType} -> Maybe Text
vTLDeviceType) (\s :: VTLDevice
s@VTLDevice' {} Maybe Text
a -> VTLDevice
s {$sel:vTLDeviceType:VTLDevice' :: Maybe Text
vTLDeviceType = Maybe Text
a} :: VTLDevice)
vTLDevice_vTLDeviceVendor :: Lens.Lens' VTLDevice (Prelude.Maybe Prelude.Text)
vTLDevice_vTLDeviceVendor :: Lens' VTLDevice (Maybe Text)
vTLDevice_vTLDeviceVendor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VTLDevice' {Maybe Text
vTLDeviceVendor :: Maybe Text
$sel:vTLDeviceVendor:VTLDevice' :: VTLDevice -> Maybe Text
vTLDeviceVendor} -> Maybe Text
vTLDeviceVendor) (\s :: VTLDevice
s@VTLDevice' {} Maybe Text
a -> VTLDevice
s {$sel:vTLDeviceVendor:VTLDevice' :: Maybe Text
vTLDeviceVendor = Maybe Text
a} :: VTLDevice)
instance Data.FromJSON VTLDevice where
parseJSON :: Value -> Parser VTLDevice
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VTLDevice"
( \Object
x ->
Maybe DeviceiSCSIAttributes
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VTLDevice
VTLDevice'
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
"DeviceiSCSIAttributes")
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
"VTLDeviceARN")
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
"VTLDeviceProductIdentifier")
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
"VTLDeviceType")
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
"VTLDeviceVendor")
)
instance Prelude.Hashable VTLDevice where
hashWithSalt :: Int -> VTLDevice -> Int
hashWithSalt Int
_salt VTLDevice' {Maybe Text
Maybe DeviceiSCSIAttributes
vTLDeviceVendor :: Maybe Text
vTLDeviceType :: Maybe Text
vTLDeviceProductIdentifier :: Maybe Text
vTLDeviceARN :: Maybe Text
deviceiSCSIAttributes :: Maybe DeviceiSCSIAttributes
$sel:vTLDeviceVendor:VTLDevice' :: VTLDevice -> Maybe Text
$sel:vTLDeviceType:VTLDevice' :: VTLDevice -> Maybe Text
$sel:vTLDeviceProductIdentifier:VTLDevice' :: VTLDevice -> Maybe Text
$sel:vTLDeviceARN:VTLDevice' :: VTLDevice -> Maybe Text
$sel:deviceiSCSIAttributes:VTLDevice' :: VTLDevice -> Maybe DeviceiSCSIAttributes
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vTLDeviceARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vTLDeviceProductIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vTLDeviceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vTLDeviceVendor
instance Prelude.NFData VTLDevice where
rnf :: VTLDevice -> ()
rnf VTLDevice' {Maybe Text
Maybe DeviceiSCSIAttributes
vTLDeviceVendor :: Maybe Text
vTLDeviceType :: Maybe Text
vTLDeviceProductIdentifier :: Maybe Text
vTLDeviceARN :: Maybe Text
deviceiSCSIAttributes :: Maybe DeviceiSCSIAttributes
$sel:vTLDeviceVendor:VTLDevice' :: VTLDevice -> Maybe Text
$sel:vTLDeviceType:VTLDevice' :: VTLDevice -> Maybe Text
$sel:vTLDeviceProductIdentifier:VTLDevice' :: VTLDevice -> Maybe Text
$sel:vTLDeviceARN:VTLDevice' :: VTLDevice -> Maybe Text
$sel:deviceiSCSIAttributes:VTLDevice' :: VTLDevice -> Maybe DeviceiSCSIAttributes
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DeviceiSCSIAttributes
deviceiSCSIAttributes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vTLDeviceARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vTLDeviceProductIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vTLDeviceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vTLDeviceVendor