{-# 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.AppMesh.Types.VirtualGatewayData where
import Amazonka.AppMesh.Types.ResourceMetadata
import Amazonka.AppMesh.Types.VirtualGatewaySpec
import Amazonka.AppMesh.Types.VirtualGatewayStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VirtualGatewayData = VirtualGatewayData'
{
VirtualGatewayData -> Text
meshName :: Prelude.Text,
VirtualGatewayData -> ResourceMetadata
metadata :: ResourceMetadata,
VirtualGatewayData -> VirtualGatewaySpec
spec :: VirtualGatewaySpec,
VirtualGatewayData -> VirtualGatewayStatus
status :: VirtualGatewayStatus,
VirtualGatewayData -> Text
virtualGatewayName :: Prelude.Text
}
deriving (VirtualGatewayData -> VirtualGatewayData -> Bool
(VirtualGatewayData -> VirtualGatewayData -> Bool)
-> (VirtualGatewayData -> VirtualGatewayData -> Bool)
-> Eq VirtualGatewayData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VirtualGatewayData -> VirtualGatewayData -> Bool
$c/= :: VirtualGatewayData -> VirtualGatewayData -> Bool
== :: VirtualGatewayData -> VirtualGatewayData -> Bool
$c== :: VirtualGatewayData -> VirtualGatewayData -> Bool
Prelude.Eq, ReadPrec [VirtualGatewayData]
ReadPrec VirtualGatewayData
Int -> ReadS VirtualGatewayData
ReadS [VirtualGatewayData]
(Int -> ReadS VirtualGatewayData)
-> ReadS [VirtualGatewayData]
-> ReadPrec VirtualGatewayData
-> ReadPrec [VirtualGatewayData]
-> Read VirtualGatewayData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VirtualGatewayData]
$creadListPrec :: ReadPrec [VirtualGatewayData]
readPrec :: ReadPrec VirtualGatewayData
$creadPrec :: ReadPrec VirtualGatewayData
readList :: ReadS [VirtualGatewayData]
$creadList :: ReadS [VirtualGatewayData]
readsPrec :: Int -> ReadS VirtualGatewayData
$creadsPrec :: Int -> ReadS VirtualGatewayData
Prelude.Read, Int -> VirtualGatewayData -> ShowS
[VirtualGatewayData] -> ShowS
VirtualGatewayData -> String
(Int -> VirtualGatewayData -> ShowS)
-> (VirtualGatewayData -> String)
-> ([VirtualGatewayData] -> ShowS)
-> Show VirtualGatewayData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VirtualGatewayData] -> ShowS
$cshowList :: [VirtualGatewayData] -> ShowS
show :: VirtualGatewayData -> String
$cshow :: VirtualGatewayData -> String
showsPrec :: Int -> VirtualGatewayData -> ShowS
$cshowsPrec :: Int -> VirtualGatewayData -> ShowS
Prelude.Show, (forall x. VirtualGatewayData -> Rep VirtualGatewayData x)
-> (forall x. Rep VirtualGatewayData x -> VirtualGatewayData)
-> Generic VirtualGatewayData
forall x. Rep VirtualGatewayData x -> VirtualGatewayData
forall x. VirtualGatewayData -> Rep VirtualGatewayData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VirtualGatewayData x -> VirtualGatewayData
$cfrom :: forall x. VirtualGatewayData -> Rep VirtualGatewayData x
Prelude.Generic)
newVirtualGatewayData ::
Prelude.Text ->
ResourceMetadata ->
VirtualGatewaySpec ->
VirtualGatewayStatus ->
Prelude.Text ->
VirtualGatewayData
newVirtualGatewayData :: Text
-> ResourceMetadata
-> VirtualGatewaySpec
-> VirtualGatewayStatus
-> Text
-> VirtualGatewayData
newVirtualGatewayData
Text
pMeshName_
ResourceMetadata
pMetadata_
VirtualGatewaySpec
pSpec_
VirtualGatewayStatus
pStatus_
Text
pVirtualGatewayName_ =
VirtualGatewayData' :: Text
-> ResourceMetadata
-> VirtualGatewaySpec
-> VirtualGatewayStatus
-> Text
-> VirtualGatewayData
VirtualGatewayData'
{ $sel:meshName:VirtualGatewayData' :: Text
meshName = Text
pMeshName_,
$sel:metadata:VirtualGatewayData' :: ResourceMetadata
metadata = ResourceMetadata
pMetadata_,
$sel:spec:VirtualGatewayData' :: VirtualGatewaySpec
spec = VirtualGatewaySpec
pSpec_,
$sel:status:VirtualGatewayData' :: VirtualGatewayStatus
status = VirtualGatewayStatus
pStatus_,
$sel:virtualGatewayName:VirtualGatewayData' :: Text
virtualGatewayName = Text
pVirtualGatewayName_
}
virtualGatewayData_meshName :: Lens.Lens' VirtualGatewayData Prelude.Text
virtualGatewayData_meshName :: (Text -> f Text) -> VirtualGatewayData -> f VirtualGatewayData
virtualGatewayData_meshName = (VirtualGatewayData -> Text)
-> (VirtualGatewayData -> Text -> VirtualGatewayData)
-> Lens VirtualGatewayData VirtualGatewayData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayData' {Text
meshName :: Text
$sel:meshName:VirtualGatewayData' :: VirtualGatewayData -> Text
meshName} -> Text
meshName) (\s :: VirtualGatewayData
s@VirtualGatewayData' {} Text
a -> VirtualGatewayData
s {$sel:meshName:VirtualGatewayData' :: Text
meshName = Text
a} :: VirtualGatewayData)
virtualGatewayData_metadata :: Lens.Lens' VirtualGatewayData ResourceMetadata
virtualGatewayData_metadata :: (ResourceMetadata -> f ResourceMetadata)
-> VirtualGatewayData -> f VirtualGatewayData
virtualGatewayData_metadata = (VirtualGatewayData -> ResourceMetadata)
-> (VirtualGatewayData -> ResourceMetadata -> VirtualGatewayData)
-> Lens
VirtualGatewayData
VirtualGatewayData
ResourceMetadata
ResourceMetadata
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayData' {ResourceMetadata
metadata :: ResourceMetadata
$sel:metadata:VirtualGatewayData' :: VirtualGatewayData -> ResourceMetadata
metadata} -> ResourceMetadata
metadata) (\s :: VirtualGatewayData
s@VirtualGatewayData' {} ResourceMetadata
a -> VirtualGatewayData
s {$sel:metadata:VirtualGatewayData' :: ResourceMetadata
metadata = ResourceMetadata
a} :: VirtualGatewayData)
virtualGatewayData_spec :: Lens.Lens' VirtualGatewayData VirtualGatewaySpec
virtualGatewayData_spec :: (VirtualGatewaySpec -> f VirtualGatewaySpec)
-> VirtualGatewayData -> f VirtualGatewayData
virtualGatewayData_spec = (VirtualGatewayData -> VirtualGatewaySpec)
-> (VirtualGatewayData -> VirtualGatewaySpec -> VirtualGatewayData)
-> Lens
VirtualGatewayData
VirtualGatewayData
VirtualGatewaySpec
VirtualGatewaySpec
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayData' {VirtualGatewaySpec
spec :: VirtualGatewaySpec
$sel:spec:VirtualGatewayData' :: VirtualGatewayData -> VirtualGatewaySpec
spec} -> VirtualGatewaySpec
spec) (\s :: VirtualGatewayData
s@VirtualGatewayData' {} VirtualGatewaySpec
a -> VirtualGatewayData
s {$sel:spec:VirtualGatewayData' :: VirtualGatewaySpec
spec = VirtualGatewaySpec
a} :: VirtualGatewayData)
virtualGatewayData_status :: Lens.Lens' VirtualGatewayData VirtualGatewayStatus
virtualGatewayData_status :: (VirtualGatewayStatus -> f VirtualGatewayStatus)
-> VirtualGatewayData -> f VirtualGatewayData
virtualGatewayData_status = (VirtualGatewayData -> VirtualGatewayStatus)
-> (VirtualGatewayData
-> VirtualGatewayStatus -> VirtualGatewayData)
-> Lens
VirtualGatewayData
VirtualGatewayData
VirtualGatewayStatus
VirtualGatewayStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayData' {VirtualGatewayStatus
status :: VirtualGatewayStatus
$sel:status:VirtualGatewayData' :: VirtualGatewayData -> VirtualGatewayStatus
status} -> VirtualGatewayStatus
status) (\s :: VirtualGatewayData
s@VirtualGatewayData' {} VirtualGatewayStatus
a -> VirtualGatewayData
s {$sel:status:VirtualGatewayData' :: VirtualGatewayStatus
status = VirtualGatewayStatus
a} :: VirtualGatewayData)
virtualGatewayData_virtualGatewayName :: Lens.Lens' VirtualGatewayData Prelude.Text
virtualGatewayData_virtualGatewayName :: (Text -> f Text) -> VirtualGatewayData -> f VirtualGatewayData
virtualGatewayData_virtualGatewayName = (VirtualGatewayData -> Text)
-> (VirtualGatewayData -> Text -> VirtualGatewayData)
-> Lens VirtualGatewayData VirtualGatewayData Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VirtualGatewayData' {Text
virtualGatewayName :: Text
$sel:virtualGatewayName:VirtualGatewayData' :: VirtualGatewayData -> Text
virtualGatewayName} -> Text
virtualGatewayName) (\s :: VirtualGatewayData
s@VirtualGatewayData' {} Text
a -> VirtualGatewayData
s {$sel:virtualGatewayName:VirtualGatewayData' :: Text
virtualGatewayName = Text
a} :: VirtualGatewayData)
instance Core.FromJSON VirtualGatewayData where
parseJSON :: Value -> Parser VirtualGatewayData
parseJSON =
String
-> (Object -> Parser VirtualGatewayData)
-> Value
-> Parser VirtualGatewayData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VirtualGatewayData"
( \Object
x ->
Text
-> ResourceMetadata
-> VirtualGatewaySpec
-> VirtualGatewayStatus
-> Text
-> VirtualGatewayData
VirtualGatewayData'
(Text
-> ResourceMetadata
-> VirtualGatewaySpec
-> VirtualGatewayStatus
-> Text
-> VirtualGatewayData)
-> Parser Text
-> Parser
(ResourceMetadata
-> VirtualGatewaySpec
-> VirtualGatewayStatus
-> Text
-> VirtualGatewayData)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"meshName")
Parser
(ResourceMetadata
-> VirtualGatewaySpec
-> VirtualGatewayStatus
-> Text
-> VirtualGatewayData)
-> Parser ResourceMetadata
-> Parser
(VirtualGatewaySpec
-> VirtualGatewayStatus -> Text -> VirtualGatewayData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ResourceMetadata
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"metadata")
Parser
(VirtualGatewaySpec
-> VirtualGatewayStatus -> Text -> VirtualGatewayData)
-> Parser VirtualGatewaySpec
-> Parser (VirtualGatewayStatus -> Text -> VirtualGatewayData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser VirtualGatewaySpec
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"spec")
Parser (VirtualGatewayStatus -> Text -> VirtualGatewayData)
-> Parser VirtualGatewayStatus
-> Parser (Text -> VirtualGatewayData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser VirtualGatewayStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Text -> VirtualGatewayData)
-> Parser Text -> Parser VirtualGatewayData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"virtualGatewayName")
)
instance Prelude.Hashable VirtualGatewayData
instance Prelude.NFData VirtualGatewayData