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