{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.Types.Route
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.Route 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.RouteOrigin
import Amazonka.EC2.Types.RouteState
import qualified Amazonka.Prelude as Prelude

-- | Describes a route in a route table.
--
-- /See:/ 'newRoute' smart constructor.
data Route = Route'
  { -- | The ID of the carrier gateway.
    Route -> Maybe Text
carrierGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the core network.
    Route -> Maybe Text
coreNetworkArn :: Prelude.Maybe Prelude.Text,
    -- | The IPv4 CIDR block used for the destination match.
    Route -> Maybe Text
destinationCidrBlock :: Prelude.Maybe Prelude.Text,
    -- | The IPv6 CIDR block used for the destination match.
    Route -> Maybe Text
destinationIpv6CidrBlock :: Prelude.Maybe Prelude.Text,
    -- | The prefix of the Amazon Web Service.
    Route -> Maybe Text
destinationPrefixListId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the egress-only internet gateway.
    Route -> Maybe Text
egressOnlyInternetGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of a gateway attached to your VPC.
    Route -> Maybe Text
gatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of a NAT instance in your VPC.
    Route -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | The ID of Amazon Web Services account that owns the instance.
    Route -> Maybe Text
instanceOwnerId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the local gateway.
    Route -> Maybe Text
localGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of a NAT gateway.
    Route -> Maybe Text
natGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the network interface.
    Route -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text,
    -- | Describes how the route was created.
    --
    -- -   @CreateRouteTable@ - The route was automatically created when the
    --     route table was created.
    --
    -- -   @CreateRoute@ - The route was manually added to the route table.
    --
    -- -   @EnableVgwRoutePropagation@ - The route was propagated by route
    --     propagation.
    Route -> Maybe RouteOrigin
origin :: Prelude.Maybe RouteOrigin,
    -- | The state of the route. The @blackhole@ state indicates that the
    -- route\'s target isn\'t available (for example, the specified gateway
    -- isn\'t attached to the VPC, or the specified NAT instance has been
    -- terminated).
    Route -> Maybe RouteState
state :: Prelude.Maybe RouteState,
    -- | The ID of a transit gateway.
    Route -> Maybe Text
transitGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of a VPC peering connection.
    Route -> Maybe Text
vpcPeeringConnectionId :: Prelude.Maybe Prelude.Text
  }
  deriving (Route -> Route -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Route -> Route -> Bool
$c/= :: Route -> Route -> Bool
== :: Route -> Route -> Bool
$c== :: Route -> Route -> Bool
Prelude.Eq, ReadPrec [Route]
ReadPrec Route
Int -> ReadS Route
ReadS [Route]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Route]
$creadListPrec :: ReadPrec [Route]
readPrec :: ReadPrec Route
$creadPrec :: ReadPrec Route
readList :: ReadS [Route]
$creadList :: ReadS [Route]
readsPrec :: Int -> ReadS Route
$creadsPrec :: Int -> ReadS Route
Prelude.Read, Int -> Route -> ShowS
[Route] -> ShowS
Route -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Route] -> ShowS
$cshowList :: [Route] -> ShowS
show :: Route -> String
$cshow :: Route -> String
showsPrec :: Int -> Route -> ShowS
$cshowsPrec :: Int -> Route -> ShowS
Prelude.Show, forall x. Rep Route x -> Route
forall x. Route -> Rep Route x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Route x -> Route
$cfrom :: forall x. Route -> Rep Route x
Prelude.Generic)

-- |
-- Create a value of 'Route' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'carrierGatewayId', 'route_carrierGatewayId' - The ID of the carrier gateway.
--
-- 'coreNetworkArn', 'route_coreNetworkArn' - The Amazon Resource Name (ARN) of the core network.
--
-- 'destinationCidrBlock', 'route_destinationCidrBlock' - The IPv4 CIDR block used for the destination match.
--
-- 'destinationIpv6CidrBlock', 'route_destinationIpv6CidrBlock' - The IPv6 CIDR block used for the destination match.
--
-- 'destinationPrefixListId', 'route_destinationPrefixListId' - The prefix of the Amazon Web Service.
--
-- 'egressOnlyInternetGatewayId', 'route_egressOnlyInternetGatewayId' - The ID of the egress-only internet gateway.
--
-- 'gatewayId', 'route_gatewayId' - The ID of a gateway attached to your VPC.
--
-- 'instanceId', 'route_instanceId' - The ID of a NAT instance in your VPC.
--
-- 'instanceOwnerId', 'route_instanceOwnerId' - The ID of Amazon Web Services account that owns the instance.
--
-- 'localGatewayId', 'route_localGatewayId' - The ID of the local gateway.
--
-- 'natGatewayId', 'route_natGatewayId' - The ID of a NAT gateway.
--
-- 'networkInterfaceId', 'route_networkInterfaceId' - The ID of the network interface.
--
-- 'origin', 'route_origin' - Describes how the route was created.
--
-- -   @CreateRouteTable@ - The route was automatically created when the
--     route table was created.
--
-- -   @CreateRoute@ - The route was manually added to the route table.
--
-- -   @EnableVgwRoutePropagation@ - The route was propagated by route
--     propagation.
--
-- 'state', 'route_state' - The state of the route. The @blackhole@ state indicates that the
-- route\'s target isn\'t available (for example, the specified gateway
-- isn\'t attached to the VPC, or the specified NAT instance has been
-- terminated).
--
-- 'transitGatewayId', 'route_transitGatewayId' - The ID of a transit gateway.
--
-- 'vpcPeeringConnectionId', 'route_vpcPeeringConnectionId' - The ID of a VPC peering connection.
newRoute ::
  Route
newRoute :: Route
newRoute =
  Route'
    { $sel:carrierGatewayId:Route' :: Maybe Text
carrierGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:coreNetworkArn:Route' :: Maybe Text
coreNetworkArn = forall a. Maybe a
Prelude.Nothing,
      $sel:destinationCidrBlock:Route' :: Maybe Text
destinationCidrBlock = forall a. Maybe a
Prelude.Nothing,
      $sel:destinationIpv6CidrBlock:Route' :: Maybe Text
destinationIpv6CidrBlock = forall a. Maybe a
Prelude.Nothing,
      $sel:destinationPrefixListId:Route' :: Maybe Text
destinationPrefixListId = forall a. Maybe a
Prelude.Nothing,
      $sel:egressOnlyInternetGatewayId:Route' :: Maybe Text
egressOnlyInternetGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:gatewayId:Route' :: Maybe Text
gatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:Route' :: Maybe Text
instanceId = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceOwnerId:Route' :: Maybe Text
instanceOwnerId = forall a. Maybe a
Prelude.Nothing,
      $sel:localGatewayId:Route' :: Maybe Text
localGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:natGatewayId:Route' :: Maybe Text
natGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaceId:Route' :: Maybe Text
networkInterfaceId = forall a. Maybe a
Prelude.Nothing,
      $sel:origin:Route' :: Maybe RouteOrigin
origin = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Route' :: Maybe RouteState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:transitGatewayId:Route' :: Maybe Text
transitGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcPeeringConnectionId:Route' :: Maybe Text
vpcPeeringConnectionId = forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the carrier gateway.
route_carrierGatewayId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_carrierGatewayId :: Lens' Route (Maybe Text)
route_carrierGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
carrierGatewayId :: Maybe Text
$sel:carrierGatewayId:Route' :: Route -> Maybe Text
carrierGatewayId} -> Maybe Text
carrierGatewayId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:carrierGatewayId:Route' :: Maybe Text
carrierGatewayId = Maybe Text
a} :: Route)

-- | The Amazon Resource Name (ARN) of the core network.
route_coreNetworkArn :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_coreNetworkArn :: Lens' Route (Maybe Text)
route_coreNetworkArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
coreNetworkArn :: Maybe Text
$sel:coreNetworkArn:Route' :: Route -> Maybe Text
coreNetworkArn} -> Maybe Text
coreNetworkArn) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:coreNetworkArn:Route' :: Maybe Text
coreNetworkArn = Maybe Text
a} :: Route)

-- | The IPv4 CIDR block used for the destination match.
route_destinationCidrBlock :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_destinationCidrBlock :: Lens' Route (Maybe Text)
route_destinationCidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
destinationCidrBlock :: Maybe Text
$sel:destinationCidrBlock:Route' :: Route -> Maybe Text
destinationCidrBlock} -> Maybe Text
destinationCidrBlock) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:destinationCidrBlock:Route' :: Maybe Text
destinationCidrBlock = Maybe Text
a} :: Route)

-- | The IPv6 CIDR block used for the destination match.
route_destinationIpv6CidrBlock :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_destinationIpv6CidrBlock :: Lens' Route (Maybe Text)
route_destinationIpv6CidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
destinationIpv6CidrBlock :: Maybe Text
$sel:destinationIpv6CidrBlock:Route' :: Route -> Maybe Text
destinationIpv6CidrBlock} -> Maybe Text
destinationIpv6CidrBlock) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:destinationIpv6CidrBlock:Route' :: Maybe Text
destinationIpv6CidrBlock = Maybe Text
a} :: Route)

-- | The prefix of the Amazon Web Service.
route_destinationPrefixListId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_destinationPrefixListId :: Lens' Route (Maybe Text)
route_destinationPrefixListId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
destinationPrefixListId :: Maybe Text
$sel:destinationPrefixListId:Route' :: Route -> Maybe Text
destinationPrefixListId} -> Maybe Text
destinationPrefixListId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:destinationPrefixListId:Route' :: Maybe Text
destinationPrefixListId = Maybe Text
a} :: Route)

-- | The ID of the egress-only internet gateway.
route_egressOnlyInternetGatewayId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_egressOnlyInternetGatewayId :: Lens' Route (Maybe Text)
route_egressOnlyInternetGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
egressOnlyInternetGatewayId :: Maybe Text
$sel:egressOnlyInternetGatewayId:Route' :: Route -> Maybe Text
egressOnlyInternetGatewayId} -> Maybe Text
egressOnlyInternetGatewayId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:egressOnlyInternetGatewayId:Route' :: Maybe Text
egressOnlyInternetGatewayId = Maybe Text
a} :: Route)

-- | The ID of a gateway attached to your VPC.
route_gatewayId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_gatewayId :: Lens' Route (Maybe Text)
route_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
gatewayId :: Maybe Text
$sel:gatewayId:Route' :: Route -> Maybe Text
gatewayId} -> Maybe Text
gatewayId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:gatewayId:Route' :: Maybe Text
gatewayId = Maybe Text
a} :: Route)

-- | The ID of a NAT instance in your VPC.
route_instanceId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_instanceId :: Lens' Route (Maybe Text)
route_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:Route' :: Route -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:instanceId:Route' :: Maybe Text
instanceId = Maybe Text
a} :: Route)

-- | The ID of Amazon Web Services account that owns the instance.
route_instanceOwnerId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_instanceOwnerId :: Lens' Route (Maybe Text)
route_instanceOwnerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
instanceOwnerId :: Maybe Text
$sel:instanceOwnerId:Route' :: Route -> Maybe Text
instanceOwnerId} -> Maybe Text
instanceOwnerId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:instanceOwnerId:Route' :: Maybe Text
instanceOwnerId = Maybe Text
a} :: Route)

-- | The ID of the local gateway.
route_localGatewayId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_localGatewayId :: Lens' Route (Maybe Text)
route_localGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
localGatewayId :: Maybe Text
$sel:localGatewayId:Route' :: Route -> Maybe Text
localGatewayId} -> Maybe Text
localGatewayId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:localGatewayId:Route' :: Maybe Text
localGatewayId = Maybe Text
a} :: Route)

-- | The ID of a NAT gateway.
route_natGatewayId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_natGatewayId :: Lens' Route (Maybe Text)
route_natGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
natGatewayId :: Maybe Text
$sel:natGatewayId:Route' :: Route -> Maybe Text
natGatewayId} -> Maybe Text
natGatewayId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:natGatewayId:Route' :: Maybe Text
natGatewayId = Maybe Text
a} :: Route)

-- | The ID of the network interface.
route_networkInterfaceId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_networkInterfaceId :: Lens' Route (Maybe Text)
route_networkInterfaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
networkInterfaceId :: Maybe Text
$sel:networkInterfaceId:Route' :: Route -> Maybe Text
networkInterfaceId} -> Maybe Text
networkInterfaceId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:networkInterfaceId:Route' :: Maybe Text
networkInterfaceId = Maybe Text
a} :: Route)

-- | Describes how the route was created.
--
-- -   @CreateRouteTable@ - The route was automatically created when the
--     route table was created.
--
-- -   @CreateRoute@ - The route was manually added to the route table.
--
-- -   @EnableVgwRoutePropagation@ - The route was propagated by route
--     propagation.
route_origin :: Lens.Lens' Route (Prelude.Maybe RouteOrigin)
route_origin :: Lens' Route (Maybe RouteOrigin)
route_origin = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe RouteOrigin
origin :: Maybe RouteOrigin
$sel:origin:Route' :: Route -> Maybe RouteOrigin
origin} -> Maybe RouteOrigin
origin) (\s :: Route
s@Route' {} Maybe RouteOrigin
a -> Route
s {$sel:origin:Route' :: Maybe RouteOrigin
origin = Maybe RouteOrigin
a} :: Route)

-- | The state of the route. The @blackhole@ state indicates that the
-- route\'s target isn\'t available (for example, the specified gateway
-- isn\'t attached to the VPC, or the specified NAT instance has been
-- terminated).
route_state :: Lens.Lens' Route (Prelude.Maybe RouteState)
route_state :: Lens' Route (Maybe RouteState)
route_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe RouteState
state :: Maybe RouteState
$sel:state:Route' :: Route -> Maybe RouteState
state} -> Maybe RouteState
state) (\s :: Route
s@Route' {} Maybe RouteState
a -> Route
s {$sel:state:Route' :: Maybe RouteState
state = Maybe RouteState
a} :: Route)

-- | The ID of a transit gateway.
route_transitGatewayId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_transitGatewayId :: Lens' Route (Maybe Text)
route_transitGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
transitGatewayId :: Maybe Text
$sel:transitGatewayId:Route' :: Route -> Maybe Text
transitGatewayId} -> Maybe Text
transitGatewayId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:transitGatewayId:Route' :: Maybe Text
transitGatewayId = Maybe Text
a} :: Route)

-- | The ID of a VPC peering connection.
route_vpcPeeringConnectionId :: Lens.Lens' Route (Prelude.Maybe Prelude.Text)
route_vpcPeeringConnectionId :: Lens' Route (Maybe Text)
route_vpcPeeringConnectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Route' {Maybe Text
vpcPeeringConnectionId :: Maybe Text
$sel:vpcPeeringConnectionId:Route' :: Route -> Maybe Text
vpcPeeringConnectionId} -> Maybe Text
vpcPeeringConnectionId) (\s :: Route
s@Route' {} Maybe Text
a -> Route
s {$sel:vpcPeeringConnectionId:Route' :: Maybe Text
vpcPeeringConnectionId = Maybe Text
a} :: Route)

instance Data.FromXML Route where
  parseXML :: [Node] -> Either String Route
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe RouteOrigin
-> Maybe RouteState
-> Maybe Text
-> Maybe Text
-> Route
Route'
      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
"carrierGatewayId")
      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
"coreNetworkArn")
      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
"destinationCidrBlock")
      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
"destinationIpv6CidrBlock")
      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
"destinationPrefixListId")
      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
"egressOnlyInternetGatewayId")
      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
"gatewayId")
      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
"instanceId")
      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
"instanceOwnerId")
      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
"localGatewayId")
      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
"natGatewayId")
      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
"networkInterfaceId")
      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
"state")
      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
"transitGatewayId")
      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
"vpcPeeringConnectionId")

instance Prelude.Hashable Route where
  hashWithSalt :: Int -> Route -> Int
hashWithSalt Int
_salt Route' {Maybe Text
Maybe RouteOrigin
Maybe RouteState
vpcPeeringConnectionId :: Maybe Text
transitGatewayId :: Maybe Text
state :: Maybe RouteState
origin :: Maybe RouteOrigin
networkInterfaceId :: Maybe Text
natGatewayId :: Maybe Text
localGatewayId :: Maybe Text
instanceOwnerId :: Maybe Text
instanceId :: Maybe Text
gatewayId :: Maybe Text
egressOnlyInternetGatewayId :: Maybe Text
destinationPrefixListId :: Maybe Text
destinationIpv6CidrBlock :: Maybe Text
destinationCidrBlock :: Maybe Text
coreNetworkArn :: Maybe Text
carrierGatewayId :: Maybe Text
$sel:vpcPeeringConnectionId:Route' :: Route -> Maybe Text
$sel:transitGatewayId:Route' :: Route -> Maybe Text
$sel:state:Route' :: Route -> Maybe RouteState
$sel:origin:Route' :: Route -> Maybe RouteOrigin
$sel:networkInterfaceId:Route' :: Route -> Maybe Text
$sel:natGatewayId:Route' :: Route -> Maybe Text
$sel:localGatewayId:Route' :: Route -> Maybe Text
$sel:instanceOwnerId:Route' :: Route -> Maybe Text
$sel:instanceId:Route' :: Route -> Maybe Text
$sel:gatewayId:Route' :: Route -> Maybe Text
$sel:egressOnlyInternetGatewayId:Route' :: Route -> Maybe Text
$sel:destinationPrefixListId:Route' :: Route -> Maybe Text
$sel:destinationIpv6CidrBlock:Route' :: Route -> Maybe Text
$sel:destinationCidrBlock:Route' :: Route -> Maybe Text
$sel:coreNetworkArn:Route' :: Route -> Maybe Text
$sel:carrierGatewayId:Route' :: Route -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
carrierGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
coreNetworkArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationCidrBlock
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationIpv6CidrBlock
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
destinationPrefixListId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
egressOnlyInternetGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceOwnerId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
localGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
natGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkInterfaceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RouteOrigin
origin
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RouteState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transitGatewayId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcPeeringConnectionId

instance Prelude.NFData Route where
  rnf :: Route -> ()
rnf Route' {Maybe Text
Maybe RouteOrigin
Maybe RouteState
vpcPeeringConnectionId :: Maybe Text
transitGatewayId :: Maybe Text
state :: Maybe RouteState
origin :: Maybe RouteOrigin
networkInterfaceId :: Maybe Text
natGatewayId :: Maybe Text
localGatewayId :: Maybe Text
instanceOwnerId :: Maybe Text
instanceId :: Maybe Text
gatewayId :: Maybe Text
egressOnlyInternetGatewayId :: Maybe Text
destinationPrefixListId :: Maybe Text
destinationIpv6CidrBlock :: Maybe Text
destinationCidrBlock :: Maybe Text
coreNetworkArn :: Maybe Text
carrierGatewayId :: Maybe Text
$sel:vpcPeeringConnectionId:Route' :: Route -> Maybe Text
$sel:transitGatewayId:Route' :: Route -> Maybe Text
$sel:state:Route' :: Route -> Maybe RouteState
$sel:origin:Route' :: Route -> Maybe RouteOrigin
$sel:networkInterfaceId:Route' :: Route -> Maybe Text
$sel:natGatewayId:Route' :: Route -> Maybe Text
$sel:localGatewayId:Route' :: Route -> Maybe Text
$sel:instanceOwnerId:Route' :: Route -> Maybe Text
$sel:instanceId:Route' :: Route -> Maybe Text
$sel:gatewayId:Route' :: Route -> Maybe Text
$sel:egressOnlyInternetGatewayId:Route' :: Route -> Maybe Text
$sel:destinationPrefixListId:Route' :: Route -> Maybe Text
$sel:destinationIpv6CidrBlock:Route' :: Route -> Maybe Text
$sel:destinationCidrBlock:Route' :: Route -> Maybe Text
$sel:coreNetworkArn:Route' :: Route -> Maybe Text
$sel:carrierGatewayId:Route' :: Route -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
carrierGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
coreNetworkArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationCidrBlock
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationIpv6CidrBlock
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
destinationPrefixListId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
egressOnlyInternetGatewayId
      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
instanceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceOwnerId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
localGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
natGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkInterfaceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteOrigin
origin
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RouteState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transitGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcPeeringConnectionId