{-# 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.NetworkFirewallMissingExpectedRTViolation
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.FMS.Types.NetworkFirewallMissingExpectedRTViolation where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Violation detail for Network Firewall for a subnet that\'s not
-- associated to the expected Firewall Manager managed route table.
--
-- /See:/ 'newNetworkFirewallMissingExpectedRTViolation' smart constructor.
data NetworkFirewallMissingExpectedRTViolation = NetworkFirewallMissingExpectedRTViolation'
  { -- | The resource ID of the current route table that\'s associated with the
    -- subnet, if one is available.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
currentRouteTable :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone of a violating subnet.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The resource ID of the VPC associated with a violating subnet.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
vpc :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Network Firewall or VPC resource that\'s in violation.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
violationTarget :: Prelude.Maybe Prelude.Text,
    -- | The resource ID of the route table that should be associated with the
    -- subnet.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
expectedRouteTable :: Prelude.Maybe Prelude.Text
  }
  deriving (NetworkFirewallMissingExpectedRTViolation
-> NetworkFirewallMissingExpectedRTViolation -> Bool
(NetworkFirewallMissingExpectedRTViolation
 -> NetworkFirewallMissingExpectedRTViolation -> Bool)
-> (NetworkFirewallMissingExpectedRTViolation
    -> NetworkFirewallMissingExpectedRTViolation -> Bool)
-> Eq NetworkFirewallMissingExpectedRTViolation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkFirewallMissingExpectedRTViolation
-> NetworkFirewallMissingExpectedRTViolation -> Bool
$c/= :: NetworkFirewallMissingExpectedRTViolation
-> NetworkFirewallMissingExpectedRTViolation -> Bool
== :: NetworkFirewallMissingExpectedRTViolation
-> NetworkFirewallMissingExpectedRTViolation -> Bool
$c== :: NetworkFirewallMissingExpectedRTViolation
-> NetworkFirewallMissingExpectedRTViolation -> Bool
Prelude.Eq, ReadPrec [NetworkFirewallMissingExpectedRTViolation]
ReadPrec NetworkFirewallMissingExpectedRTViolation
Int -> ReadS NetworkFirewallMissingExpectedRTViolation
ReadS [NetworkFirewallMissingExpectedRTViolation]
(Int -> ReadS NetworkFirewallMissingExpectedRTViolation)
-> ReadS [NetworkFirewallMissingExpectedRTViolation]
-> ReadPrec NetworkFirewallMissingExpectedRTViolation
-> ReadPrec [NetworkFirewallMissingExpectedRTViolation]
-> Read NetworkFirewallMissingExpectedRTViolation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkFirewallMissingExpectedRTViolation]
$creadListPrec :: ReadPrec [NetworkFirewallMissingExpectedRTViolation]
readPrec :: ReadPrec NetworkFirewallMissingExpectedRTViolation
$creadPrec :: ReadPrec NetworkFirewallMissingExpectedRTViolation
readList :: ReadS [NetworkFirewallMissingExpectedRTViolation]
$creadList :: ReadS [NetworkFirewallMissingExpectedRTViolation]
readsPrec :: Int -> ReadS NetworkFirewallMissingExpectedRTViolation
$creadsPrec :: Int -> ReadS NetworkFirewallMissingExpectedRTViolation
Prelude.Read, Int -> NetworkFirewallMissingExpectedRTViolation -> ShowS
[NetworkFirewallMissingExpectedRTViolation] -> ShowS
NetworkFirewallMissingExpectedRTViolation -> String
(Int -> NetworkFirewallMissingExpectedRTViolation -> ShowS)
-> (NetworkFirewallMissingExpectedRTViolation -> String)
-> ([NetworkFirewallMissingExpectedRTViolation] -> ShowS)
-> Show NetworkFirewallMissingExpectedRTViolation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkFirewallMissingExpectedRTViolation] -> ShowS
$cshowList :: [NetworkFirewallMissingExpectedRTViolation] -> ShowS
show :: NetworkFirewallMissingExpectedRTViolation -> String
$cshow :: NetworkFirewallMissingExpectedRTViolation -> String
showsPrec :: Int -> NetworkFirewallMissingExpectedRTViolation -> ShowS
$cshowsPrec :: Int -> NetworkFirewallMissingExpectedRTViolation -> ShowS
Prelude.Show, (forall x.
 NetworkFirewallMissingExpectedRTViolation
 -> Rep NetworkFirewallMissingExpectedRTViolation x)
-> (forall x.
    Rep NetworkFirewallMissingExpectedRTViolation x
    -> NetworkFirewallMissingExpectedRTViolation)
-> Generic NetworkFirewallMissingExpectedRTViolation
forall x.
Rep NetworkFirewallMissingExpectedRTViolation x
-> NetworkFirewallMissingExpectedRTViolation
forall x.
NetworkFirewallMissingExpectedRTViolation
-> Rep NetworkFirewallMissingExpectedRTViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkFirewallMissingExpectedRTViolation x
-> NetworkFirewallMissingExpectedRTViolation
$cfrom :: forall x.
NetworkFirewallMissingExpectedRTViolation
-> Rep NetworkFirewallMissingExpectedRTViolation x
Prelude.Generic)

-- |
-- Create a value of 'NetworkFirewallMissingExpectedRTViolation' 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:
--
-- 'currentRouteTable', 'networkFirewallMissingExpectedRTViolation_currentRouteTable' - The resource ID of the current route table that\'s associated with the
-- subnet, if one is available.
--
-- 'availabilityZone', 'networkFirewallMissingExpectedRTViolation_availabilityZone' - The Availability Zone of a violating subnet.
--
-- 'vpc', 'networkFirewallMissingExpectedRTViolation_vpc' - The resource ID of the VPC associated with a violating subnet.
--
-- 'violationTarget', 'networkFirewallMissingExpectedRTViolation_violationTarget' - The ID of the Network Firewall or VPC resource that\'s in violation.
--
-- 'expectedRouteTable', 'networkFirewallMissingExpectedRTViolation_expectedRouteTable' - The resource ID of the route table that should be associated with the
-- subnet.
newNetworkFirewallMissingExpectedRTViolation ::
  NetworkFirewallMissingExpectedRTViolation
newNetworkFirewallMissingExpectedRTViolation :: NetworkFirewallMissingExpectedRTViolation
newNetworkFirewallMissingExpectedRTViolation =
  NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkFirewallMissingExpectedRTViolation
NetworkFirewallMissingExpectedRTViolation'
    { $sel:currentRouteTable:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
currentRouteTable =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
availabilityZone =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpc:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
vpc = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:violationTarget:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
violationTarget =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:expectedRouteTable:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
expectedRouteTable =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The resource ID of the current route table that\'s associated with the
-- subnet, if one is available.
networkFirewallMissingExpectedRTViolation_currentRouteTable :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_currentRouteTable :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallMissingExpectedRTViolation
-> f NetworkFirewallMissingExpectedRTViolation
networkFirewallMissingExpectedRTViolation_currentRouteTable = (NetworkFirewallMissingExpectedRTViolation -> Maybe Text)
-> (NetworkFirewallMissingExpectedRTViolation
    -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Lens
     NetworkFirewallMissingExpectedRTViolation
     NetworkFirewallMissingExpectedRTViolation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallMissingExpectedRTViolation' {Maybe Text
currentRouteTable :: Maybe Text
$sel:currentRouteTable:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
currentRouteTable} -> Maybe Text
currentRouteTable) (\s :: NetworkFirewallMissingExpectedRTViolation
s@NetworkFirewallMissingExpectedRTViolation' {} Maybe Text
a -> NetworkFirewallMissingExpectedRTViolation
s {$sel:currentRouteTable:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
currentRouteTable = Maybe Text
a} :: NetworkFirewallMissingExpectedRTViolation)

-- | The Availability Zone of a violating subnet.
networkFirewallMissingExpectedRTViolation_availabilityZone :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_availabilityZone :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallMissingExpectedRTViolation
-> f NetworkFirewallMissingExpectedRTViolation
networkFirewallMissingExpectedRTViolation_availabilityZone = (NetworkFirewallMissingExpectedRTViolation -> Maybe Text)
-> (NetworkFirewallMissingExpectedRTViolation
    -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Lens
     NetworkFirewallMissingExpectedRTViolation
     NetworkFirewallMissingExpectedRTViolation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallMissingExpectedRTViolation' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: NetworkFirewallMissingExpectedRTViolation
s@NetworkFirewallMissingExpectedRTViolation' {} Maybe Text
a -> NetworkFirewallMissingExpectedRTViolation
s {$sel:availabilityZone:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
availabilityZone = Maybe Text
a} :: NetworkFirewallMissingExpectedRTViolation)

-- | The resource ID of the VPC associated with a violating subnet.
networkFirewallMissingExpectedRTViolation_vpc :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_vpc :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallMissingExpectedRTViolation
-> f NetworkFirewallMissingExpectedRTViolation
networkFirewallMissingExpectedRTViolation_vpc = (NetworkFirewallMissingExpectedRTViolation -> Maybe Text)
-> (NetworkFirewallMissingExpectedRTViolation
    -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Lens
     NetworkFirewallMissingExpectedRTViolation
     NetworkFirewallMissingExpectedRTViolation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallMissingExpectedRTViolation' {Maybe Text
vpc :: Maybe Text
$sel:vpc:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
vpc} -> Maybe Text
vpc) (\s :: NetworkFirewallMissingExpectedRTViolation
s@NetworkFirewallMissingExpectedRTViolation' {} Maybe Text
a -> NetworkFirewallMissingExpectedRTViolation
s {$sel:vpc:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
vpc = Maybe Text
a} :: NetworkFirewallMissingExpectedRTViolation)

-- | The ID of the Network Firewall or VPC resource that\'s in violation.
networkFirewallMissingExpectedRTViolation_violationTarget :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_violationTarget :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallMissingExpectedRTViolation
-> f NetworkFirewallMissingExpectedRTViolation
networkFirewallMissingExpectedRTViolation_violationTarget = (NetworkFirewallMissingExpectedRTViolation -> Maybe Text)
-> (NetworkFirewallMissingExpectedRTViolation
    -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Lens
     NetworkFirewallMissingExpectedRTViolation
     NetworkFirewallMissingExpectedRTViolation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallMissingExpectedRTViolation' {Maybe Text
violationTarget :: Maybe Text
$sel:violationTarget:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
violationTarget} -> Maybe Text
violationTarget) (\s :: NetworkFirewallMissingExpectedRTViolation
s@NetworkFirewallMissingExpectedRTViolation' {} Maybe Text
a -> NetworkFirewallMissingExpectedRTViolation
s {$sel:violationTarget:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
violationTarget = Maybe Text
a} :: NetworkFirewallMissingExpectedRTViolation)

-- | The resource ID of the route table that should be associated with the
-- subnet.
networkFirewallMissingExpectedRTViolation_expectedRouteTable :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_expectedRouteTable :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallMissingExpectedRTViolation
-> f NetworkFirewallMissingExpectedRTViolation
networkFirewallMissingExpectedRTViolation_expectedRouteTable = (NetworkFirewallMissingExpectedRTViolation -> Maybe Text)
-> (NetworkFirewallMissingExpectedRTViolation
    -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Lens
     NetworkFirewallMissingExpectedRTViolation
     NetworkFirewallMissingExpectedRTViolation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallMissingExpectedRTViolation' {Maybe Text
expectedRouteTable :: Maybe Text
$sel:expectedRouteTable:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
expectedRouteTable} -> Maybe Text
expectedRouteTable) (\s :: NetworkFirewallMissingExpectedRTViolation
s@NetworkFirewallMissingExpectedRTViolation' {} Maybe Text
a -> NetworkFirewallMissingExpectedRTViolation
s {$sel:expectedRouteTable:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
expectedRouteTable = Maybe Text
a} :: NetworkFirewallMissingExpectedRTViolation)

instance
  Core.FromJSON
    NetworkFirewallMissingExpectedRTViolation
  where
  parseJSON :: Value -> Parser NetworkFirewallMissingExpectedRTViolation
parseJSON =
    String
-> (Object -> Parser NetworkFirewallMissingExpectedRTViolation)
-> Value
-> Parser NetworkFirewallMissingExpectedRTViolation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NetworkFirewallMissingExpectedRTViolation"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkFirewallMissingExpectedRTViolation
NetworkFirewallMissingExpectedRTViolation'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> NetworkFirewallMissingExpectedRTViolation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NetworkFirewallMissingExpectedRTViolation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentRouteTable")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NetworkFirewallMissingExpectedRTViolation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NetworkFirewallMissingExpectedRTViolation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AvailabilityZone")
              Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NetworkFirewallMissingExpectedRTViolation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VPC")
              Parser
  (Maybe Text
   -> Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ViolationTarget")
              Parser (Maybe Text -> NetworkFirewallMissingExpectedRTViolation)
-> Parser (Maybe Text)
-> Parser NetworkFirewallMissingExpectedRTViolation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpectedRouteTable")
      )

instance
  Prelude.Hashable
    NetworkFirewallMissingExpectedRTViolation

instance
  Prelude.NFData
    NetworkFirewallMissingExpectedRTViolation