{-# 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.GatewayInfo 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.HostEnvironment
data GatewayInfo = GatewayInfo'
{
GatewayInfo -> Maybe Text
ec2InstanceId :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe Text
ec2InstanceRegion :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe Text
gatewayARN :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe Text
gatewayId :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe Text
gatewayName :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe Text
gatewayOperationalState :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe Text
gatewayType :: Prelude.Maybe Prelude.Text,
GatewayInfo -> Maybe HostEnvironment
hostEnvironment :: Prelude.Maybe HostEnvironment,
GatewayInfo -> Maybe Text
hostEnvironmentId :: Prelude.Maybe Prelude.Text
}
deriving (GatewayInfo -> GatewayInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GatewayInfo -> GatewayInfo -> Bool
$c/= :: GatewayInfo -> GatewayInfo -> Bool
== :: GatewayInfo -> GatewayInfo -> Bool
$c== :: GatewayInfo -> GatewayInfo -> Bool
Prelude.Eq, ReadPrec [GatewayInfo]
ReadPrec GatewayInfo
Int -> ReadS GatewayInfo
ReadS [GatewayInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GatewayInfo]
$creadListPrec :: ReadPrec [GatewayInfo]
readPrec :: ReadPrec GatewayInfo
$creadPrec :: ReadPrec GatewayInfo
readList :: ReadS [GatewayInfo]
$creadList :: ReadS [GatewayInfo]
readsPrec :: Int -> ReadS GatewayInfo
$creadsPrec :: Int -> ReadS GatewayInfo
Prelude.Read, Int -> GatewayInfo -> ShowS
[GatewayInfo] -> ShowS
GatewayInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GatewayInfo] -> ShowS
$cshowList :: [GatewayInfo] -> ShowS
show :: GatewayInfo -> String
$cshow :: GatewayInfo -> String
showsPrec :: Int -> GatewayInfo -> ShowS
$cshowsPrec :: Int -> GatewayInfo -> ShowS
Prelude.Show, forall x. Rep GatewayInfo x -> GatewayInfo
forall x. GatewayInfo -> Rep GatewayInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GatewayInfo x -> GatewayInfo
$cfrom :: forall x. GatewayInfo -> Rep GatewayInfo x
Prelude.Generic)
newGatewayInfo ::
GatewayInfo
newGatewayInfo :: GatewayInfo
newGatewayInfo =
GatewayInfo'
{ $sel:ec2InstanceId:GatewayInfo' :: Maybe Text
ec2InstanceId = forall a. Maybe a
Prelude.Nothing,
$sel:ec2InstanceRegion:GatewayInfo' :: Maybe Text
ec2InstanceRegion = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayARN:GatewayInfo' :: Maybe Text
gatewayARN = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayId:GatewayInfo' :: Maybe Text
gatewayId = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayName:GatewayInfo' :: Maybe Text
gatewayName = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayOperationalState:GatewayInfo' :: Maybe Text
gatewayOperationalState = forall a. Maybe a
Prelude.Nothing,
$sel:gatewayType:GatewayInfo' :: Maybe Text
gatewayType = forall a. Maybe a
Prelude.Nothing,
$sel:hostEnvironment:GatewayInfo' :: Maybe HostEnvironment
hostEnvironment = forall a. Maybe a
Prelude.Nothing,
$sel:hostEnvironmentId:GatewayInfo' :: Maybe Text
hostEnvironmentId = forall a. Maybe a
Prelude.Nothing
}
gatewayInfo_ec2InstanceId :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_ec2InstanceId :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_ec2InstanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
ec2InstanceId :: Maybe Text
$sel:ec2InstanceId:GatewayInfo' :: GatewayInfo -> Maybe Text
ec2InstanceId} -> Maybe Text
ec2InstanceId) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:ec2InstanceId:GatewayInfo' :: Maybe Text
ec2InstanceId = Maybe Text
a} :: GatewayInfo)
gatewayInfo_ec2InstanceRegion :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_ec2InstanceRegion :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_ec2InstanceRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
ec2InstanceRegion :: Maybe Text
$sel:ec2InstanceRegion:GatewayInfo' :: GatewayInfo -> Maybe Text
ec2InstanceRegion} -> Maybe Text
ec2InstanceRegion) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:ec2InstanceRegion:GatewayInfo' :: Maybe Text
ec2InstanceRegion = Maybe Text
a} :: GatewayInfo)
gatewayInfo_gatewayARN :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_gatewayARN :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_gatewayARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
gatewayARN :: Maybe Text
$sel:gatewayARN:GatewayInfo' :: GatewayInfo -> Maybe Text
gatewayARN} -> Maybe Text
gatewayARN) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:gatewayARN:GatewayInfo' :: Maybe Text
gatewayARN = Maybe Text
a} :: GatewayInfo)
gatewayInfo_gatewayId :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_gatewayId :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
gatewayId :: Maybe Text
$sel:gatewayId:GatewayInfo' :: GatewayInfo -> Maybe Text
gatewayId} -> Maybe Text
gatewayId) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:gatewayId:GatewayInfo' :: Maybe Text
gatewayId = Maybe Text
a} :: GatewayInfo)
gatewayInfo_gatewayName :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_gatewayName :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_gatewayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
gatewayName :: Maybe Text
$sel:gatewayName:GatewayInfo' :: GatewayInfo -> Maybe Text
gatewayName} -> Maybe Text
gatewayName) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:gatewayName:GatewayInfo' :: Maybe Text
gatewayName = Maybe Text
a} :: GatewayInfo)
gatewayInfo_gatewayOperationalState :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_gatewayOperationalState :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_gatewayOperationalState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
gatewayOperationalState :: Maybe Text
$sel:gatewayOperationalState:GatewayInfo' :: GatewayInfo -> Maybe Text
gatewayOperationalState} -> Maybe Text
gatewayOperationalState) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:gatewayOperationalState:GatewayInfo' :: Maybe Text
gatewayOperationalState = Maybe Text
a} :: GatewayInfo)
gatewayInfo_gatewayType :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_gatewayType :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_gatewayType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
gatewayType :: Maybe Text
$sel:gatewayType:GatewayInfo' :: GatewayInfo -> Maybe Text
gatewayType} -> Maybe Text
gatewayType) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:gatewayType:GatewayInfo' :: Maybe Text
gatewayType = Maybe Text
a} :: GatewayInfo)
gatewayInfo_hostEnvironment :: Lens.Lens' GatewayInfo (Prelude.Maybe HostEnvironment)
gatewayInfo_hostEnvironment :: Lens' GatewayInfo (Maybe HostEnvironment)
gatewayInfo_hostEnvironment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe HostEnvironment
hostEnvironment :: Maybe HostEnvironment
$sel:hostEnvironment:GatewayInfo' :: GatewayInfo -> Maybe HostEnvironment
hostEnvironment} -> Maybe HostEnvironment
hostEnvironment) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe HostEnvironment
a -> GatewayInfo
s {$sel:hostEnvironment:GatewayInfo' :: Maybe HostEnvironment
hostEnvironment = Maybe HostEnvironment
a} :: GatewayInfo)
gatewayInfo_hostEnvironmentId :: Lens.Lens' GatewayInfo (Prelude.Maybe Prelude.Text)
gatewayInfo_hostEnvironmentId :: Lens' GatewayInfo (Maybe Text)
gatewayInfo_hostEnvironmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayInfo' {Maybe Text
hostEnvironmentId :: Maybe Text
$sel:hostEnvironmentId:GatewayInfo' :: GatewayInfo -> Maybe Text
hostEnvironmentId} -> Maybe Text
hostEnvironmentId) (\s :: GatewayInfo
s@GatewayInfo' {} Maybe Text
a -> GatewayInfo
s {$sel:hostEnvironmentId:GatewayInfo' :: Maybe Text
hostEnvironmentId = Maybe Text
a} :: GatewayInfo)
instance Data.FromJSON GatewayInfo where
parseJSON :: Value -> Parser GatewayInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"GatewayInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe HostEnvironment
-> Maybe Text
-> GatewayInfo
GatewayInfo'
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
"Ec2InstanceId")
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
"Ec2InstanceRegion")
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
"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
"GatewayName")
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
"GatewayOperationalState")
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
"GatewayType")
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
"HostEnvironment")
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
"HostEnvironmentId")
)
instance Prelude.Hashable GatewayInfo where
hashWithSalt :: Int -> GatewayInfo -> Int
hashWithSalt Int
_salt GatewayInfo' {Maybe Text
Maybe HostEnvironment
hostEnvironmentId :: Maybe Text
hostEnvironment :: Maybe HostEnvironment
gatewayType :: Maybe Text
gatewayOperationalState :: Maybe Text
gatewayName :: Maybe Text
gatewayId :: Maybe Text
gatewayARN :: Maybe Text
ec2InstanceRegion :: Maybe Text
ec2InstanceId :: Maybe Text
$sel:hostEnvironmentId:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:hostEnvironment:GatewayInfo' :: GatewayInfo -> Maybe HostEnvironment
$sel:gatewayType:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayOperationalState:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayName:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayId:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayARN:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:ec2InstanceRegion:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:ec2InstanceId:GatewayInfo' :: GatewayInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ec2InstanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ec2InstanceRegion
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
gatewayName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayOperationalState
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HostEnvironment
hostEnvironment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostEnvironmentId
instance Prelude.NFData GatewayInfo where
rnf :: GatewayInfo -> ()
rnf GatewayInfo' {Maybe Text
Maybe HostEnvironment
hostEnvironmentId :: Maybe Text
hostEnvironment :: Maybe HostEnvironment
gatewayType :: Maybe Text
gatewayOperationalState :: Maybe Text
gatewayName :: Maybe Text
gatewayId :: Maybe Text
gatewayARN :: Maybe Text
ec2InstanceRegion :: Maybe Text
ec2InstanceId :: Maybe Text
$sel:hostEnvironmentId:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:hostEnvironment:GatewayInfo' :: GatewayInfo -> Maybe HostEnvironment
$sel:gatewayType:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayOperationalState:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayName:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayId:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:gatewayARN:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:ec2InstanceRegion:GatewayInfo' :: GatewayInfo -> Maybe Text
$sel:ec2InstanceId:GatewayInfo' :: GatewayInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ec2InstanceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ec2InstanceRegion
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
gatewayName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayOperationalState
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gatewayType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HostEnvironment
hostEnvironment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostEnvironmentId