{-# 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.FMS.Types.RouteHasOutOfScopeEndpointViolation
-- 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.FMS.Types.RouteHasOutOfScopeEndpointViolation where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FMS.Types.Route
import qualified Amazonka.Prelude as Prelude

-- | Contains details about the route endpoint that violates the policy
-- scope.
--
-- /See:/ 'newRouteHasOutOfScopeEndpointViolation' smart constructor.
data RouteHasOutOfScopeEndpointViolation = RouteHasOutOfScopeEndpointViolation'
  { -- | The route table associated with the current firewall subnet.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
currentFirewallSubnetRouteTable :: Prelude.Maybe Prelude.Text,
    -- | The current route table associated with the Internet Gateway.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
currentInternetGatewayRouteTable :: Prelude.Maybe Prelude.Text,
    -- | The ID of the firewall subnet.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
firewallSubnetId :: Prelude.Maybe Prelude.Text,
    -- | The list of firewall subnet routes.
    RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
firewallSubnetRoutes :: Prelude.Maybe [Route],
    -- | The ID of the Internet Gateway.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
internetGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The routes in the route table associated with the Internet Gateway.
    RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
internetGatewayRoutes :: Prelude.Maybe [Route],
    -- | The ID of the route table.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
routeTableId :: Prelude.Maybe Prelude.Text,
    -- | The subnet\'s Availability Zone.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
subnetAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The ID of the subnet\'s Availability Zone.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
subnetAvailabilityZoneId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the subnet associated with the route that violates the policy
    -- scope.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
    -- | The list of routes that violate the route table.
    RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
violatingRoutes :: Prelude.Maybe [Route],
    -- | The VPC ID of the route that violates the policy scope.
    RouteHasOutOfScopeEndpointViolation -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
  }
  deriving (RouteHasOutOfScopeEndpointViolation
-> RouteHasOutOfScopeEndpointViolation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RouteHasOutOfScopeEndpointViolation
-> RouteHasOutOfScopeEndpointViolation -> Bool
$c/= :: RouteHasOutOfScopeEndpointViolation
-> RouteHasOutOfScopeEndpointViolation -> Bool
== :: RouteHasOutOfScopeEndpointViolation
-> RouteHasOutOfScopeEndpointViolation -> Bool
$c== :: RouteHasOutOfScopeEndpointViolation
-> RouteHasOutOfScopeEndpointViolation -> Bool
Prelude.Eq, ReadPrec [RouteHasOutOfScopeEndpointViolation]
ReadPrec RouteHasOutOfScopeEndpointViolation
Int -> ReadS RouteHasOutOfScopeEndpointViolation
ReadS [RouteHasOutOfScopeEndpointViolation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RouteHasOutOfScopeEndpointViolation]
$creadListPrec :: ReadPrec [RouteHasOutOfScopeEndpointViolation]
readPrec :: ReadPrec RouteHasOutOfScopeEndpointViolation
$creadPrec :: ReadPrec RouteHasOutOfScopeEndpointViolation
readList :: ReadS [RouteHasOutOfScopeEndpointViolation]
$creadList :: ReadS [RouteHasOutOfScopeEndpointViolation]
readsPrec :: Int -> ReadS RouteHasOutOfScopeEndpointViolation
$creadsPrec :: Int -> ReadS RouteHasOutOfScopeEndpointViolation
Prelude.Read, Int -> RouteHasOutOfScopeEndpointViolation -> ShowS
[RouteHasOutOfScopeEndpointViolation] -> ShowS
RouteHasOutOfScopeEndpointViolation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RouteHasOutOfScopeEndpointViolation] -> ShowS
$cshowList :: [RouteHasOutOfScopeEndpointViolation] -> ShowS
show :: RouteHasOutOfScopeEndpointViolation -> String
$cshow :: RouteHasOutOfScopeEndpointViolation -> String
showsPrec :: Int -> RouteHasOutOfScopeEndpointViolation -> ShowS
$cshowsPrec :: Int -> RouteHasOutOfScopeEndpointViolation -> ShowS
Prelude.Show, forall x.
Rep RouteHasOutOfScopeEndpointViolation x
-> RouteHasOutOfScopeEndpointViolation
forall x.
RouteHasOutOfScopeEndpointViolation
-> Rep RouteHasOutOfScopeEndpointViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RouteHasOutOfScopeEndpointViolation x
-> RouteHasOutOfScopeEndpointViolation
$cfrom :: forall x.
RouteHasOutOfScopeEndpointViolation
-> Rep RouteHasOutOfScopeEndpointViolation x
Prelude.Generic)

-- |
-- Create a value of 'RouteHasOutOfScopeEndpointViolation' 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:
--
-- 'currentFirewallSubnetRouteTable', 'routeHasOutOfScopeEndpointViolation_currentFirewallSubnetRouteTable' - The route table associated with the current firewall subnet.
--
-- 'currentInternetGatewayRouteTable', 'routeHasOutOfScopeEndpointViolation_currentInternetGatewayRouteTable' - The current route table associated with the Internet Gateway.
--
-- 'firewallSubnetId', 'routeHasOutOfScopeEndpointViolation_firewallSubnetId' - The ID of the firewall subnet.
--
-- 'firewallSubnetRoutes', 'routeHasOutOfScopeEndpointViolation_firewallSubnetRoutes' - The list of firewall subnet routes.
--
-- 'internetGatewayId', 'routeHasOutOfScopeEndpointViolation_internetGatewayId' - The ID of the Internet Gateway.
--
-- 'internetGatewayRoutes', 'routeHasOutOfScopeEndpointViolation_internetGatewayRoutes' - The routes in the route table associated with the Internet Gateway.
--
-- 'routeTableId', 'routeHasOutOfScopeEndpointViolation_routeTableId' - The ID of the route table.
--
-- 'subnetAvailabilityZone', 'routeHasOutOfScopeEndpointViolation_subnetAvailabilityZone' - The subnet\'s Availability Zone.
--
-- 'subnetAvailabilityZoneId', 'routeHasOutOfScopeEndpointViolation_subnetAvailabilityZoneId' - The ID of the subnet\'s Availability Zone.
--
-- 'subnetId', 'routeHasOutOfScopeEndpointViolation_subnetId' - The ID of the subnet associated with the route that violates the policy
-- scope.
--
-- 'violatingRoutes', 'routeHasOutOfScopeEndpointViolation_violatingRoutes' - The list of routes that violate the route table.
--
-- 'vpcId', 'routeHasOutOfScopeEndpointViolation_vpcId' - The VPC ID of the route that violates the policy scope.
newRouteHasOutOfScopeEndpointViolation ::
  RouteHasOutOfScopeEndpointViolation
newRouteHasOutOfScopeEndpointViolation :: RouteHasOutOfScopeEndpointViolation
newRouteHasOutOfScopeEndpointViolation =
  RouteHasOutOfScopeEndpointViolation'
    { $sel:currentFirewallSubnetRouteTable:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
currentFirewallSubnetRouteTable =
        forall a. Maybe a
Prelude.Nothing,
      $sel:currentInternetGatewayRouteTable:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
currentInternetGatewayRouteTable =
        forall a. Maybe a
Prelude.Nothing,
      $sel:firewallSubnetId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
firewallSubnetId = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallSubnetRoutes:RouteHasOutOfScopeEndpointViolation' :: Maybe [Route]
firewallSubnetRoutes = forall a. Maybe a
Prelude.Nothing,
      $sel:internetGatewayId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
internetGatewayId = forall a. Maybe a
Prelude.Nothing,
      $sel:internetGatewayRoutes:RouteHasOutOfScopeEndpointViolation' :: Maybe [Route]
internetGatewayRoutes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:routeTableId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
routeTableId = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetAvailabilityZone:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
subnetAvailabilityZone =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetAvailabilityZoneId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
subnetAvailabilityZoneId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing,
      $sel:violatingRoutes:RouteHasOutOfScopeEndpointViolation' :: Maybe [Route]
violatingRoutes = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
    }

-- | The route table associated with the current firewall subnet.
routeHasOutOfScopeEndpointViolation_currentFirewallSubnetRouteTable :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_currentFirewallSubnetRouteTable :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_currentFirewallSubnetRouteTable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
currentFirewallSubnetRouteTable :: Maybe Text
$sel:currentFirewallSubnetRouteTable:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
currentFirewallSubnetRouteTable} -> Maybe Text
currentFirewallSubnetRouteTable) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:currentFirewallSubnetRouteTable:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
currentFirewallSubnetRouteTable = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The current route table associated with the Internet Gateway.
routeHasOutOfScopeEndpointViolation_currentInternetGatewayRouteTable :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_currentInternetGatewayRouteTable :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_currentInternetGatewayRouteTable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
currentInternetGatewayRouteTable :: Maybe Text
$sel:currentInternetGatewayRouteTable:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
currentInternetGatewayRouteTable} -> Maybe Text
currentInternetGatewayRouteTable) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:currentInternetGatewayRouteTable:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
currentInternetGatewayRouteTable = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The ID of the firewall subnet.
routeHasOutOfScopeEndpointViolation_firewallSubnetId :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_firewallSubnetId :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_firewallSubnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
firewallSubnetId :: Maybe Text
$sel:firewallSubnetId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
firewallSubnetId} -> Maybe Text
firewallSubnetId) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:firewallSubnetId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
firewallSubnetId = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The list of firewall subnet routes.
routeHasOutOfScopeEndpointViolation_firewallSubnetRoutes :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe [Route])
routeHasOutOfScopeEndpointViolation_firewallSubnetRoutes :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe [Route])
routeHasOutOfScopeEndpointViolation_firewallSubnetRoutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe [Route]
firewallSubnetRoutes :: Maybe [Route]
$sel:firewallSubnetRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
firewallSubnetRoutes} -> Maybe [Route]
firewallSubnetRoutes) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe [Route]
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:firewallSubnetRoutes:RouteHasOutOfScopeEndpointViolation' :: Maybe [Route]
firewallSubnetRoutes = Maybe [Route]
a} :: RouteHasOutOfScopeEndpointViolation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the Internet Gateway.
routeHasOutOfScopeEndpointViolation_internetGatewayId :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_internetGatewayId :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_internetGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
internetGatewayId :: Maybe Text
$sel:internetGatewayId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
internetGatewayId} -> Maybe Text
internetGatewayId) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:internetGatewayId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
internetGatewayId = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The routes in the route table associated with the Internet Gateway.
routeHasOutOfScopeEndpointViolation_internetGatewayRoutes :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe [Route])
routeHasOutOfScopeEndpointViolation_internetGatewayRoutes :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe [Route])
routeHasOutOfScopeEndpointViolation_internetGatewayRoutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe [Route]
internetGatewayRoutes :: Maybe [Route]
$sel:internetGatewayRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
internetGatewayRoutes} -> Maybe [Route]
internetGatewayRoutes) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe [Route]
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:internetGatewayRoutes:RouteHasOutOfScopeEndpointViolation' :: Maybe [Route]
internetGatewayRoutes = Maybe [Route]
a} :: RouteHasOutOfScopeEndpointViolation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the route table.
routeHasOutOfScopeEndpointViolation_routeTableId :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_routeTableId :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_routeTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
routeTableId :: Maybe Text
$sel:routeTableId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
routeTableId} -> Maybe Text
routeTableId) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:routeTableId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
routeTableId = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The subnet\'s Availability Zone.
routeHasOutOfScopeEndpointViolation_subnetAvailabilityZone :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_subnetAvailabilityZone :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_subnetAvailabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
subnetAvailabilityZone :: Maybe Text
$sel:subnetAvailabilityZone:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
subnetAvailabilityZone} -> Maybe Text
subnetAvailabilityZone) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:subnetAvailabilityZone:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
subnetAvailabilityZone = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The ID of the subnet\'s Availability Zone.
routeHasOutOfScopeEndpointViolation_subnetAvailabilityZoneId :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_subnetAvailabilityZoneId :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_subnetAvailabilityZoneId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
subnetAvailabilityZoneId :: Maybe Text
$sel:subnetAvailabilityZoneId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
subnetAvailabilityZoneId} -> Maybe Text
subnetAvailabilityZoneId) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:subnetAvailabilityZoneId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
subnetAvailabilityZoneId = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The ID of the subnet associated with the route that violates the policy
-- scope.
routeHasOutOfScopeEndpointViolation_subnetId :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_subnetId :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:subnetId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
subnetId = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

-- | The list of routes that violate the route table.
routeHasOutOfScopeEndpointViolation_violatingRoutes :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe [Route])
routeHasOutOfScopeEndpointViolation_violatingRoutes :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe [Route])
routeHasOutOfScopeEndpointViolation_violatingRoutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe [Route]
violatingRoutes :: Maybe [Route]
$sel:violatingRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
violatingRoutes} -> Maybe [Route]
violatingRoutes) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe [Route]
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:violatingRoutes:RouteHasOutOfScopeEndpointViolation' :: Maybe [Route]
violatingRoutes = Maybe [Route]
a} :: RouteHasOutOfScopeEndpointViolation) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The VPC ID of the route that violates the policy scope.
routeHasOutOfScopeEndpointViolation_vpcId :: Lens.Lens' RouteHasOutOfScopeEndpointViolation (Prelude.Maybe Prelude.Text)
routeHasOutOfScopeEndpointViolation_vpcId :: Lens' RouteHasOutOfScopeEndpointViolation (Maybe Text)
routeHasOutOfScopeEndpointViolation_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouteHasOutOfScopeEndpointViolation' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: RouteHasOutOfScopeEndpointViolation
s@RouteHasOutOfScopeEndpointViolation' {} Maybe Text
a -> RouteHasOutOfScopeEndpointViolation
s {$sel:vpcId:RouteHasOutOfScopeEndpointViolation' :: Maybe Text
vpcId = Maybe Text
a} :: RouteHasOutOfScopeEndpointViolation)

instance
  Data.FromJSON
    RouteHasOutOfScopeEndpointViolation
  where
  parseJSON :: Value -> Parser RouteHasOutOfScopeEndpointViolation
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RouteHasOutOfScopeEndpointViolation"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Route]
-> Maybe Text
-> Maybe [Route]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Route]
-> Maybe Text
-> RouteHasOutOfScopeEndpointViolation
RouteHasOutOfScopeEndpointViolation'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CurrentFirewallSubnetRouteTable")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CurrentInternetGatewayRouteTable")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FirewallSubnetId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FirewallSubnetRoutes"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InternetGatewayId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InternetGatewayRoutes"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RouteTableId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetAvailabilityZone")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetAvailabilityZoneId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ViolatingRoutes"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VpcId")
      )

instance
  Prelude.Hashable
    RouteHasOutOfScopeEndpointViolation
  where
  hashWithSalt :: Int -> RouteHasOutOfScopeEndpointViolation -> Int
hashWithSalt
    Int
_salt
    RouteHasOutOfScopeEndpointViolation' {Maybe [Route]
Maybe Text
vpcId :: Maybe Text
violatingRoutes :: Maybe [Route]
subnetId :: Maybe Text
subnetAvailabilityZoneId :: Maybe Text
subnetAvailabilityZone :: Maybe Text
routeTableId :: Maybe Text
internetGatewayRoutes :: Maybe [Route]
internetGatewayId :: Maybe Text
firewallSubnetRoutes :: Maybe [Route]
firewallSubnetId :: Maybe Text
currentInternetGatewayRouteTable :: Maybe Text
currentFirewallSubnetRouteTable :: Maybe Text
$sel:vpcId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:violatingRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
$sel:subnetId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:subnetAvailabilityZoneId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:subnetAvailabilityZone:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:routeTableId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:internetGatewayRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
$sel:internetGatewayId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:firewallSubnetRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
$sel:firewallSubnetId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:currentInternetGatewayRouteTable:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:currentFirewallSubnetRouteTable:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
currentFirewallSubnetRouteTable
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
currentInternetGatewayRouteTable
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firewallSubnetId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Route]
firewallSubnetRoutes
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
internetGatewayId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Route]
internetGatewayRoutes
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routeTableId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetAvailabilityZone
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetAvailabilityZoneId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Route]
violatingRoutes
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId

instance
  Prelude.NFData
    RouteHasOutOfScopeEndpointViolation
  where
  rnf :: RouteHasOutOfScopeEndpointViolation -> ()
rnf RouteHasOutOfScopeEndpointViolation' {Maybe [Route]
Maybe Text
vpcId :: Maybe Text
violatingRoutes :: Maybe [Route]
subnetId :: Maybe Text
subnetAvailabilityZoneId :: Maybe Text
subnetAvailabilityZone :: Maybe Text
routeTableId :: Maybe Text
internetGatewayRoutes :: Maybe [Route]
internetGatewayId :: Maybe Text
firewallSubnetRoutes :: Maybe [Route]
firewallSubnetId :: Maybe Text
currentInternetGatewayRouteTable :: Maybe Text
currentFirewallSubnetRouteTable :: Maybe Text
$sel:vpcId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:violatingRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
$sel:subnetId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:subnetAvailabilityZoneId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:subnetAvailabilityZone:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:routeTableId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:internetGatewayRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
$sel:internetGatewayId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:firewallSubnetRoutes:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe [Route]
$sel:firewallSubnetId:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:currentInternetGatewayRouteTable:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
$sel:currentFirewallSubnetRouteTable:RouteHasOutOfScopeEndpointViolation' :: RouteHasOutOfScopeEndpointViolation -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
currentFirewallSubnetRouteTable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
currentInternetGatewayRouteTable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firewallSubnetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Route]
firewallSubnetRoutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
internetGatewayId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Route]
internetGatewayRoutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routeTableId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetAvailabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetAvailabilityZoneId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Route]
violatingRoutes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId