{-# 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.VolumeiSCSIAttributes 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 VolumeiSCSIAttributes = VolumeiSCSIAttributes'
{
VolumeiSCSIAttributes -> Maybe Bool
chapEnabled :: Prelude.Maybe Prelude.Bool,
VolumeiSCSIAttributes -> Maybe Natural
lunNumber :: Prelude.Maybe Prelude.Natural,
VolumeiSCSIAttributes -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text,
VolumeiSCSIAttributes -> Maybe Int
networkInterfacePort :: Prelude.Maybe Prelude.Int,
VolumeiSCSIAttributes -> Maybe Text
targetARN :: Prelude.Maybe Prelude.Text
}
deriving (VolumeiSCSIAttributes -> VolumeiSCSIAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeiSCSIAttributes -> VolumeiSCSIAttributes -> Bool
$c/= :: VolumeiSCSIAttributes -> VolumeiSCSIAttributes -> Bool
== :: VolumeiSCSIAttributes -> VolumeiSCSIAttributes -> Bool
$c== :: VolumeiSCSIAttributes -> VolumeiSCSIAttributes -> Bool
Prelude.Eq, ReadPrec [VolumeiSCSIAttributes]
ReadPrec VolumeiSCSIAttributes
Int -> ReadS VolumeiSCSIAttributes
ReadS [VolumeiSCSIAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeiSCSIAttributes]
$creadListPrec :: ReadPrec [VolumeiSCSIAttributes]
readPrec :: ReadPrec VolumeiSCSIAttributes
$creadPrec :: ReadPrec VolumeiSCSIAttributes
readList :: ReadS [VolumeiSCSIAttributes]
$creadList :: ReadS [VolumeiSCSIAttributes]
readsPrec :: Int -> ReadS VolumeiSCSIAttributes
$creadsPrec :: Int -> ReadS VolumeiSCSIAttributes
Prelude.Read, Int -> VolumeiSCSIAttributes -> ShowS
[VolumeiSCSIAttributes] -> ShowS
VolumeiSCSIAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeiSCSIAttributes] -> ShowS
$cshowList :: [VolumeiSCSIAttributes] -> ShowS
show :: VolumeiSCSIAttributes -> String
$cshow :: VolumeiSCSIAttributes -> String
showsPrec :: Int -> VolumeiSCSIAttributes -> ShowS
$cshowsPrec :: Int -> VolumeiSCSIAttributes -> ShowS
Prelude.Show, forall x. Rep VolumeiSCSIAttributes x -> VolumeiSCSIAttributes
forall x. VolumeiSCSIAttributes -> Rep VolumeiSCSIAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeiSCSIAttributes x -> VolumeiSCSIAttributes
$cfrom :: forall x. VolumeiSCSIAttributes -> Rep VolumeiSCSIAttributes x
Prelude.Generic)
newVolumeiSCSIAttributes ::
VolumeiSCSIAttributes
newVolumeiSCSIAttributes :: VolumeiSCSIAttributes
newVolumeiSCSIAttributes =
VolumeiSCSIAttributes'
{ $sel:chapEnabled:VolumeiSCSIAttributes' :: Maybe Bool
chapEnabled =
forall a. Maybe a
Prelude.Nothing,
$sel:lunNumber:VolumeiSCSIAttributes' :: Maybe Natural
lunNumber = forall a. Maybe a
Prelude.Nothing,
$sel:networkInterfaceId:VolumeiSCSIAttributes' :: Maybe Text
networkInterfaceId = forall a. Maybe a
Prelude.Nothing,
$sel:networkInterfacePort:VolumeiSCSIAttributes' :: Maybe Int
networkInterfacePort = forall a. Maybe a
Prelude.Nothing,
$sel:targetARN:VolumeiSCSIAttributes' :: Maybe Text
targetARN = forall a. Maybe a
Prelude.Nothing
}
volumeiSCSIAttributes_chapEnabled :: Lens.Lens' VolumeiSCSIAttributes (Prelude.Maybe Prelude.Bool)
volumeiSCSIAttributes_chapEnabled :: Lens' VolumeiSCSIAttributes (Maybe Bool)
volumeiSCSIAttributes_chapEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeiSCSIAttributes' {Maybe Bool
chapEnabled :: Maybe Bool
$sel:chapEnabled:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Bool
chapEnabled} -> Maybe Bool
chapEnabled) (\s :: VolumeiSCSIAttributes
s@VolumeiSCSIAttributes' {} Maybe Bool
a -> VolumeiSCSIAttributes
s {$sel:chapEnabled:VolumeiSCSIAttributes' :: Maybe Bool
chapEnabled = Maybe Bool
a} :: VolumeiSCSIAttributes)
volumeiSCSIAttributes_lunNumber :: Lens.Lens' VolumeiSCSIAttributes (Prelude.Maybe Prelude.Natural)
volumeiSCSIAttributes_lunNumber :: Lens' VolumeiSCSIAttributes (Maybe Natural)
volumeiSCSIAttributes_lunNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeiSCSIAttributes' {Maybe Natural
lunNumber :: Maybe Natural
$sel:lunNumber:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Natural
lunNumber} -> Maybe Natural
lunNumber) (\s :: VolumeiSCSIAttributes
s@VolumeiSCSIAttributes' {} Maybe Natural
a -> VolumeiSCSIAttributes
s {$sel:lunNumber:VolumeiSCSIAttributes' :: Maybe Natural
lunNumber = Maybe Natural
a} :: VolumeiSCSIAttributes)
volumeiSCSIAttributes_networkInterfaceId :: Lens.Lens' VolumeiSCSIAttributes (Prelude.Maybe Prelude.Text)
volumeiSCSIAttributes_networkInterfaceId :: Lens' VolumeiSCSIAttributes (Maybe Text)
volumeiSCSIAttributes_networkInterfaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeiSCSIAttributes' {Maybe Text
networkInterfaceId :: Maybe Text
$sel:networkInterfaceId:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Text
networkInterfaceId} -> Maybe Text
networkInterfaceId) (\s :: VolumeiSCSIAttributes
s@VolumeiSCSIAttributes' {} Maybe Text
a -> VolumeiSCSIAttributes
s {$sel:networkInterfaceId:VolumeiSCSIAttributes' :: Maybe Text
networkInterfaceId = Maybe Text
a} :: VolumeiSCSIAttributes)
volumeiSCSIAttributes_networkInterfacePort :: Lens.Lens' VolumeiSCSIAttributes (Prelude.Maybe Prelude.Int)
volumeiSCSIAttributes_networkInterfacePort :: Lens' VolumeiSCSIAttributes (Maybe Int)
volumeiSCSIAttributes_networkInterfacePort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeiSCSIAttributes' {Maybe Int
networkInterfacePort :: Maybe Int
$sel:networkInterfacePort:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Int
networkInterfacePort} -> Maybe Int
networkInterfacePort) (\s :: VolumeiSCSIAttributes
s@VolumeiSCSIAttributes' {} Maybe Int
a -> VolumeiSCSIAttributes
s {$sel:networkInterfacePort:VolumeiSCSIAttributes' :: Maybe Int
networkInterfacePort = Maybe Int
a} :: VolumeiSCSIAttributes)
volumeiSCSIAttributes_targetARN :: Lens.Lens' VolumeiSCSIAttributes (Prelude.Maybe Prelude.Text)
volumeiSCSIAttributes_targetARN :: Lens' VolumeiSCSIAttributes (Maybe Text)
volumeiSCSIAttributes_targetARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeiSCSIAttributes' {Maybe Text
targetARN :: Maybe Text
$sel:targetARN:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Text
targetARN} -> Maybe Text
targetARN) (\s :: VolumeiSCSIAttributes
s@VolumeiSCSIAttributes' {} Maybe Text
a -> VolumeiSCSIAttributes
s {$sel:targetARN:VolumeiSCSIAttributes' :: Maybe Text
targetARN = Maybe Text
a} :: VolumeiSCSIAttributes)
instance Data.FromJSON VolumeiSCSIAttributes where
parseJSON :: Value -> Parser VolumeiSCSIAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VolumeiSCSIAttributes"
( \Object
x ->
Maybe Bool
-> Maybe Natural
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> VolumeiSCSIAttributes
VolumeiSCSIAttributes'
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
"ChapEnabled")
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
"LunNumber")
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
"NetworkInterfaceId")
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
"NetworkInterfacePort")
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
"TargetARN")
)
instance Prelude.Hashable VolumeiSCSIAttributes where
hashWithSalt :: Int -> VolumeiSCSIAttributes -> Int
hashWithSalt Int
_salt VolumeiSCSIAttributes' {Maybe Bool
Maybe Int
Maybe Natural
Maybe Text
targetARN :: Maybe Text
networkInterfacePort :: Maybe Int
networkInterfaceId :: Maybe Text
lunNumber :: Maybe Natural
chapEnabled :: Maybe Bool
$sel:targetARN:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Text
$sel:networkInterfacePort:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Int
$sel:networkInterfaceId:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Text
$sel:lunNumber:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Natural
$sel:chapEnabled:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
chapEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
lunNumber
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkInterfaceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
networkInterfacePort
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetARN
instance Prelude.NFData VolumeiSCSIAttributes where
rnf :: VolumeiSCSIAttributes -> ()
rnf VolumeiSCSIAttributes' {Maybe Bool
Maybe Int
Maybe Natural
Maybe Text
targetARN :: Maybe Text
networkInterfacePort :: Maybe Int
networkInterfaceId :: Maybe Text
lunNumber :: Maybe Natural
chapEnabled :: Maybe Bool
$sel:targetARN:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Text
$sel:networkInterfacePort:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Int
$sel:networkInterfaceId:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Text
$sel:lunNumber:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Natural
$sel:chapEnabled:VolumeiSCSIAttributes' :: VolumeiSCSIAttributes -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
chapEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
lunNumber
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkInterfaceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
networkInterfacePort
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetARN