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