{-# 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-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.NetworkFirewallMissingExpectedRTViolation where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 Availability Zone of a violating subnet.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | 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 resource ID of the route table that should be associated with the
    -- subnet.
    NetworkFirewallMissingExpectedRTViolation -> Maybe Text
expectedRouteTable :: 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
  }
  deriving (NetworkFirewallMissingExpectedRTViolation
-> NetworkFirewallMissingExpectedRTViolation -> Bool
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]
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
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.
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:
--
-- 'availabilityZone', 'networkFirewallMissingExpectedRTViolation_availabilityZone' - The Availability Zone of a violating subnet.
--
-- 'currentRouteTable', 'networkFirewallMissingExpectedRTViolation_currentRouteTable' - The resource ID of the current route table that\'s associated with the
-- subnet, if one is available.
--
-- 'expectedRouteTable', 'networkFirewallMissingExpectedRTViolation_expectedRouteTable' - The resource ID of the route table that should be associated with the
-- 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.
newNetworkFirewallMissingExpectedRTViolation ::
  NetworkFirewallMissingExpectedRTViolation
newNetworkFirewallMissingExpectedRTViolation :: NetworkFirewallMissingExpectedRTViolation
newNetworkFirewallMissingExpectedRTViolation =
  NetworkFirewallMissingExpectedRTViolation'
    { $sel:availabilityZone:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
availabilityZone =
        forall a. Maybe a
Prelude.Nothing,
      $sel:currentRouteTable:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
currentRouteTable =
        forall a. Maybe a
Prelude.Nothing,
      $sel:expectedRouteTable:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
expectedRouteTable =
        forall a. Maybe a
Prelude.Nothing,
      $sel:vpc:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
vpc = forall a. Maybe a
Prelude.Nothing,
      $sel:violationTarget:NetworkFirewallMissingExpectedRTViolation' :: Maybe Text
violationTarget =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The Availability Zone of a violating subnet.
networkFirewallMissingExpectedRTViolation_availabilityZone :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_availabilityZone :: Lens' NetworkFirewallMissingExpectedRTViolation (Maybe Text)
networkFirewallMissingExpectedRTViolation_availabilityZone = 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 current route table that\'s associated with the
-- subnet, if one is available.
networkFirewallMissingExpectedRTViolation_currentRouteTable :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_currentRouteTable :: Lens' NetworkFirewallMissingExpectedRTViolation (Maybe Text)
networkFirewallMissingExpectedRTViolation_currentRouteTable = 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 resource ID of the route table that should be associated with the
-- subnet.
networkFirewallMissingExpectedRTViolation_expectedRouteTable :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_expectedRouteTable :: Lens' NetworkFirewallMissingExpectedRTViolation (Maybe Text)
networkFirewallMissingExpectedRTViolation_expectedRouteTable = 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)

-- | The resource ID of the VPC associated with a violating subnet.
networkFirewallMissingExpectedRTViolation_vpc :: Lens.Lens' NetworkFirewallMissingExpectedRTViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingExpectedRTViolation_vpc :: Lens' NetworkFirewallMissingExpectedRTViolation (Maybe Text)
networkFirewallMissingExpectedRTViolation_vpc = 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 :: Lens' NetworkFirewallMissingExpectedRTViolation (Maybe Text)
networkFirewallMissingExpectedRTViolation_violationTarget = 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)

instance
  Data.FromJSON
    NetworkFirewallMissingExpectedRTViolation
  where
  parseJSON :: Value -> Parser NetworkFirewallMissingExpectedRTViolation
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"NetworkFirewallMissingExpectedRTViolation"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkFirewallMissingExpectedRTViolation
NetworkFirewallMissingExpectedRTViolation'
            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
"AvailabilityZone")
            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
"CurrentRouteTable")
            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
"ExpectedRouteTable")
            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
"VPC")
            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
"ViolationTarget")
      )

instance
  Prelude.Hashable
    NetworkFirewallMissingExpectedRTViolation
  where
  hashWithSalt :: Int -> NetworkFirewallMissingExpectedRTViolation -> Int
hashWithSalt
    Int
_salt
    NetworkFirewallMissingExpectedRTViolation' {Maybe Text
violationTarget :: Maybe Text
vpc :: Maybe Text
expectedRouteTable :: Maybe Text
currentRouteTable :: Maybe Text
availabilityZone :: Maybe Text
$sel:violationTarget:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:vpc:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:expectedRouteTable:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:currentRouteTable:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:availabilityZone:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availabilityZone
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
currentRouteTable
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
expectedRouteTable
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpc
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
violationTarget

instance
  Prelude.NFData
    NetworkFirewallMissingExpectedRTViolation
  where
  rnf :: NetworkFirewallMissingExpectedRTViolation -> ()
rnf NetworkFirewallMissingExpectedRTViolation' {Maybe Text
violationTarget :: Maybe Text
vpc :: Maybe Text
expectedRouteTable :: Maybe Text
currentRouteTable :: Maybe Text
availabilityZone :: Maybe Text
$sel:violationTarget:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:vpc:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:expectedRouteTable:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:currentRouteTable:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
$sel:availabilityZone:NetworkFirewallMissingExpectedRTViolation' :: NetworkFirewallMissingExpectedRTViolation -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
currentRouteTable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
expectedRouteTable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpc
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
violationTarget