{-# 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.EC2.Types.ClientVpnRoute where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.ClientVpnRouteStatus
import qualified Amazonka.Prelude as Prelude
data ClientVpnRoute = ClientVpnRoute'
{
ClientVpnRoute -> Maybe Text
clientVpnEndpointId :: Prelude.Maybe Prelude.Text,
ClientVpnRoute -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ClientVpnRoute -> Maybe Text
destinationCidr :: Prelude.Maybe Prelude.Text,
ClientVpnRoute -> Maybe Text
origin :: Prelude.Maybe Prelude.Text,
ClientVpnRoute -> Maybe ClientVpnRouteStatus
status :: Prelude.Maybe ClientVpnRouteStatus,
ClientVpnRoute -> Maybe Text
targetSubnet :: Prelude.Maybe Prelude.Text,
ClientVpnRoute -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (ClientVpnRoute -> ClientVpnRoute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClientVpnRoute -> ClientVpnRoute -> Bool
$c/= :: ClientVpnRoute -> ClientVpnRoute -> Bool
== :: ClientVpnRoute -> ClientVpnRoute -> Bool
$c== :: ClientVpnRoute -> ClientVpnRoute -> Bool
Prelude.Eq, ReadPrec [ClientVpnRoute]
ReadPrec ClientVpnRoute
Int -> ReadS ClientVpnRoute
ReadS [ClientVpnRoute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClientVpnRoute]
$creadListPrec :: ReadPrec [ClientVpnRoute]
readPrec :: ReadPrec ClientVpnRoute
$creadPrec :: ReadPrec ClientVpnRoute
readList :: ReadS [ClientVpnRoute]
$creadList :: ReadS [ClientVpnRoute]
readsPrec :: Int -> ReadS ClientVpnRoute
$creadsPrec :: Int -> ReadS ClientVpnRoute
Prelude.Read, Int -> ClientVpnRoute -> ShowS
[ClientVpnRoute] -> ShowS
ClientVpnRoute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClientVpnRoute] -> ShowS
$cshowList :: [ClientVpnRoute] -> ShowS
show :: ClientVpnRoute -> String
$cshow :: ClientVpnRoute -> String
showsPrec :: Int -> ClientVpnRoute -> ShowS
$cshowsPrec :: Int -> ClientVpnRoute -> ShowS
Prelude.Show, forall x. Rep ClientVpnRoute x -> ClientVpnRoute
forall x. ClientVpnRoute -> Rep ClientVpnRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClientVpnRoute x -> ClientVpnRoute
$cfrom :: forall x. ClientVpnRoute -> Rep ClientVpnRoute x
Prelude.Generic)
newClientVpnRoute ::
ClientVpnRoute
newClientVpnRoute :: ClientVpnRoute
newClientVpnRoute =
ClientVpnRoute'
{ $sel:clientVpnEndpointId:ClientVpnRoute' :: Maybe Text
clientVpnEndpointId =
forall a. Maybe a
Prelude.Nothing,
$sel:description:ClientVpnRoute' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:destinationCidr:ClientVpnRoute' :: Maybe Text
destinationCidr = forall a. Maybe a
Prelude.Nothing,
$sel:origin:ClientVpnRoute' :: Maybe Text
origin = forall a. Maybe a
Prelude.Nothing,
$sel:status:ClientVpnRoute' :: Maybe ClientVpnRouteStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:targetSubnet:ClientVpnRoute' :: Maybe Text
targetSubnet = forall a. Maybe a
Prelude.Nothing,
$sel:type':ClientVpnRoute' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing
}
clientVpnRoute_clientVpnEndpointId :: Lens.Lens' ClientVpnRoute (Prelude.Maybe Prelude.Text)
clientVpnRoute_clientVpnEndpointId :: Lens' ClientVpnRoute (Maybe Text)
clientVpnRoute_clientVpnEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe Text
clientVpnEndpointId :: Maybe Text
$sel:clientVpnEndpointId:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
clientVpnEndpointId} -> Maybe Text
clientVpnEndpointId) (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe Text
a -> ClientVpnRoute
s {$sel:clientVpnEndpointId:ClientVpnRoute' :: Maybe Text
clientVpnEndpointId = Maybe Text
a} :: ClientVpnRoute)
clientVpnRoute_description :: Lens.Lens' ClientVpnRoute (Prelude.Maybe Prelude.Text)
clientVpnRoute_description :: Lens' ClientVpnRoute (Maybe Text)
clientVpnRoute_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe Text
description :: Maybe Text
$sel:description:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
description} -> Maybe Text
description) (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe Text
a -> ClientVpnRoute
s {$sel:description:ClientVpnRoute' :: Maybe Text
description = Maybe Text
a} :: ClientVpnRoute)
clientVpnRoute_destinationCidr :: Lens.Lens' ClientVpnRoute (Prelude.Maybe Prelude.Text)
clientVpnRoute_destinationCidr :: Lens' ClientVpnRoute (Maybe Text)
clientVpnRoute_destinationCidr = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe Text
destinationCidr :: Maybe Text
$sel:destinationCidr:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
destinationCidr} -> Maybe Text
destinationCidr) (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe Text
a -> ClientVpnRoute
s {$sel:destinationCidr:ClientVpnRoute' :: Maybe Text
destinationCidr = Maybe Text
a} :: ClientVpnRoute)
clientVpnRoute_origin :: Lens.Lens' ClientVpnRoute (Prelude.Maybe Prelude.Text)
clientVpnRoute_origin :: Lens' ClientVpnRoute (Maybe Text)
clientVpnRoute_origin = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe Text
origin :: Maybe Text
$sel:origin:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
origin} -> Maybe Text
origin) (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe Text
a -> ClientVpnRoute
s {$sel:origin:ClientVpnRoute' :: Maybe Text
origin = Maybe Text
a} :: ClientVpnRoute)
clientVpnRoute_status :: Lens.Lens' ClientVpnRoute (Prelude.Maybe ClientVpnRouteStatus)
clientVpnRoute_status :: Lens' ClientVpnRoute (Maybe ClientVpnRouteStatus)
clientVpnRoute_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe ClientVpnRouteStatus
status :: Maybe ClientVpnRouteStatus
$sel:status:ClientVpnRoute' :: ClientVpnRoute -> Maybe ClientVpnRouteStatus
status} -> Maybe ClientVpnRouteStatus
status) (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe ClientVpnRouteStatus
a -> ClientVpnRoute
s {$sel:status:ClientVpnRoute' :: Maybe ClientVpnRouteStatus
status = Maybe ClientVpnRouteStatus
a} :: ClientVpnRoute)
clientVpnRoute_targetSubnet :: Lens.Lens' ClientVpnRoute (Prelude.Maybe Prelude.Text)
clientVpnRoute_targetSubnet :: Lens' ClientVpnRoute (Maybe Text)
clientVpnRoute_targetSubnet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe Text
targetSubnet :: Maybe Text
$sel:targetSubnet:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
targetSubnet} -> Maybe Text
targetSubnet) (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe Text
a -> ClientVpnRoute
s {$sel:targetSubnet:ClientVpnRoute' :: Maybe Text
targetSubnet = Maybe Text
a} :: ClientVpnRoute)
clientVpnRoute_type :: Lens.Lens' ClientVpnRoute (Prelude.Maybe Prelude.Text)
clientVpnRoute_type :: Lens' ClientVpnRoute (Maybe Text)
clientVpnRoute_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClientVpnRoute' {Maybe Text
type' :: Maybe Text
$sel:type':ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
type'} -> Maybe Text
type') (\s :: ClientVpnRoute
s@ClientVpnRoute' {} Maybe Text
a -> ClientVpnRoute
s {$sel:type':ClientVpnRoute' :: Maybe Text
type' = Maybe Text
a} :: ClientVpnRoute)
instance Data.FromXML ClientVpnRoute where
parseXML :: [Node] -> Either String ClientVpnRoute
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ClientVpnRouteStatus
-> Maybe Text
-> Maybe Text
-> ClientVpnRoute
ClientVpnRoute'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"clientVpnEndpointId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"destinationCidr")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"origin")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"targetSubnet")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"type")
instance Prelude.Hashable ClientVpnRoute where
hashWithSalt :: Int -> ClientVpnRoute -> Int
hashWithSalt Int
_salt ClientVpnRoute' {Maybe Text
Maybe ClientVpnRouteStatus
type' :: Maybe Text
targetSubnet :: Maybe Text
status :: Maybe ClientVpnRouteStatus
origin :: Maybe Text
destinationCidr :: Maybe Text
description :: Maybe Text
clientVpnEndpointId :: Maybe Text
$sel:type':ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:targetSubnet:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:status:ClientVpnRoute' :: ClientVpnRoute -> Maybe ClientVpnRouteStatus
$sel:origin:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:destinationCidr:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:description:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:clientVpnEndpointId:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientVpnEndpointId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationCidr
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
origin
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ClientVpnRouteStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
targetSubnet
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
instance Prelude.NFData ClientVpnRoute where
rnf :: ClientVpnRoute -> ()
rnf ClientVpnRoute' {Maybe Text
Maybe ClientVpnRouteStatus
type' :: Maybe Text
targetSubnet :: Maybe Text
status :: Maybe ClientVpnRouteStatus
origin :: Maybe Text
destinationCidr :: Maybe Text
description :: Maybe Text
clientVpnEndpointId :: Maybe Text
$sel:type':ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:targetSubnet:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:status:ClientVpnRoute' :: ClientVpnRoute -> Maybe ClientVpnRouteStatus
$sel:origin:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:destinationCidr:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:description:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
$sel:clientVpnEndpointId:ClientVpnRoute' :: ClientVpnRoute -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientVpnEndpointId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationCidr
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
origin
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ClientVpnRouteStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
targetSubnet
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'