{-# 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.NetworkFirewallMissingFirewallViolation
-- 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.NetworkFirewallMissingFirewallViolation 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 doesn\'t have a
-- Firewall Manager managed firewall in its VPC.
--
-- /See:/ 'newNetworkFirewallMissingFirewallViolation' smart constructor.
data NetworkFirewallMissingFirewallViolation = NetworkFirewallMissingFirewallViolation'
  { -- | The reason the resource has this violation, if one is available.
    NetworkFirewallMissingFirewallViolation -> Maybe Text
targetViolationReason :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone of a violating subnet.
    NetworkFirewallMissingFirewallViolation -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The resource ID of the VPC associated with a violating subnet.
    NetworkFirewallMissingFirewallViolation -> Maybe Text
vpc :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Network Firewall or VPC resource that\'s in violation.
    NetworkFirewallMissingFirewallViolation -> Maybe Text
violationTarget :: Prelude.Maybe Prelude.Text
  }
  deriving (NetworkFirewallMissingFirewallViolation
-> NetworkFirewallMissingFirewallViolation -> Bool
(NetworkFirewallMissingFirewallViolation
 -> NetworkFirewallMissingFirewallViolation -> Bool)
-> (NetworkFirewallMissingFirewallViolation
    -> NetworkFirewallMissingFirewallViolation -> Bool)
-> Eq NetworkFirewallMissingFirewallViolation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkFirewallMissingFirewallViolation
-> NetworkFirewallMissingFirewallViolation -> Bool
$c/= :: NetworkFirewallMissingFirewallViolation
-> NetworkFirewallMissingFirewallViolation -> Bool
== :: NetworkFirewallMissingFirewallViolation
-> NetworkFirewallMissingFirewallViolation -> Bool
$c== :: NetworkFirewallMissingFirewallViolation
-> NetworkFirewallMissingFirewallViolation -> Bool
Prelude.Eq, ReadPrec [NetworkFirewallMissingFirewallViolation]
ReadPrec NetworkFirewallMissingFirewallViolation
Int -> ReadS NetworkFirewallMissingFirewallViolation
ReadS [NetworkFirewallMissingFirewallViolation]
(Int -> ReadS NetworkFirewallMissingFirewallViolation)
-> ReadS [NetworkFirewallMissingFirewallViolation]
-> ReadPrec NetworkFirewallMissingFirewallViolation
-> ReadPrec [NetworkFirewallMissingFirewallViolation]
-> Read NetworkFirewallMissingFirewallViolation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkFirewallMissingFirewallViolation]
$creadListPrec :: ReadPrec [NetworkFirewallMissingFirewallViolation]
readPrec :: ReadPrec NetworkFirewallMissingFirewallViolation
$creadPrec :: ReadPrec NetworkFirewallMissingFirewallViolation
readList :: ReadS [NetworkFirewallMissingFirewallViolation]
$creadList :: ReadS [NetworkFirewallMissingFirewallViolation]
readsPrec :: Int -> ReadS NetworkFirewallMissingFirewallViolation
$creadsPrec :: Int -> ReadS NetworkFirewallMissingFirewallViolation
Prelude.Read, Int -> NetworkFirewallMissingFirewallViolation -> ShowS
[NetworkFirewallMissingFirewallViolation] -> ShowS
NetworkFirewallMissingFirewallViolation -> String
(Int -> NetworkFirewallMissingFirewallViolation -> ShowS)
-> (NetworkFirewallMissingFirewallViolation -> String)
-> ([NetworkFirewallMissingFirewallViolation] -> ShowS)
-> Show NetworkFirewallMissingFirewallViolation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkFirewallMissingFirewallViolation] -> ShowS
$cshowList :: [NetworkFirewallMissingFirewallViolation] -> ShowS
show :: NetworkFirewallMissingFirewallViolation -> String
$cshow :: NetworkFirewallMissingFirewallViolation -> String
showsPrec :: Int -> NetworkFirewallMissingFirewallViolation -> ShowS
$cshowsPrec :: Int -> NetworkFirewallMissingFirewallViolation -> ShowS
Prelude.Show, (forall x.
 NetworkFirewallMissingFirewallViolation
 -> Rep NetworkFirewallMissingFirewallViolation x)
-> (forall x.
    Rep NetworkFirewallMissingFirewallViolation x
    -> NetworkFirewallMissingFirewallViolation)
-> Generic NetworkFirewallMissingFirewallViolation
forall x.
Rep NetworkFirewallMissingFirewallViolation x
-> NetworkFirewallMissingFirewallViolation
forall x.
NetworkFirewallMissingFirewallViolation
-> Rep NetworkFirewallMissingFirewallViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkFirewallMissingFirewallViolation x
-> NetworkFirewallMissingFirewallViolation
$cfrom :: forall x.
NetworkFirewallMissingFirewallViolation
-> Rep NetworkFirewallMissingFirewallViolation x
Prelude.Generic)

-- |
-- Create a value of 'NetworkFirewallMissingFirewallViolation' 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:
--
-- 'targetViolationReason', 'networkFirewallMissingFirewallViolation_targetViolationReason' - The reason the resource has this violation, if one is available.
--
-- 'availabilityZone', 'networkFirewallMissingFirewallViolation_availabilityZone' - The Availability Zone of a violating subnet.
--
-- 'vpc', 'networkFirewallMissingFirewallViolation_vpc' - The resource ID of the VPC associated with a violating subnet.
--
-- 'violationTarget', 'networkFirewallMissingFirewallViolation_violationTarget' - The ID of the Network Firewall or VPC resource that\'s in violation.
newNetworkFirewallMissingFirewallViolation ::
  NetworkFirewallMissingFirewallViolation
newNetworkFirewallMissingFirewallViolation :: NetworkFirewallMissingFirewallViolation
newNetworkFirewallMissingFirewallViolation =
  NetworkFirewallMissingFirewallViolation' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkFirewallMissingFirewallViolation
NetworkFirewallMissingFirewallViolation'
    { $sel:targetViolationReason:NetworkFirewallMissingFirewallViolation' :: Maybe Text
targetViolationReason =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:NetworkFirewallMissingFirewallViolation' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpc:NetworkFirewallMissingFirewallViolation' :: Maybe Text
vpc = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:violationTarget:NetworkFirewallMissingFirewallViolation' :: Maybe Text
violationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The reason the resource has this violation, if one is available.
networkFirewallMissingFirewallViolation_targetViolationReason :: Lens.Lens' NetworkFirewallMissingFirewallViolation (Prelude.Maybe Prelude.Text)
networkFirewallMissingFirewallViolation_targetViolationReason :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallMissingFirewallViolation
-> f NetworkFirewallMissingFirewallViolation
networkFirewallMissingFirewallViolation_targetViolationReason = (NetworkFirewallMissingFirewallViolation -> Maybe Text)
-> (NetworkFirewallMissingFirewallViolation
    -> Maybe Text -> NetworkFirewallMissingFirewallViolation)
-> Lens
     NetworkFirewallMissingFirewallViolation
     NetworkFirewallMissingFirewallViolation
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallMissingFirewallViolation' {Maybe Text
targetViolationReason :: Maybe Text
$sel:targetViolationReason:NetworkFirewallMissingFirewallViolation' :: NetworkFirewallMissingFirewallViolation -> Maybe Text
targetViolationReason} -> Maybe Text
targetViolationReason) (\s :: NetworkFirewallMissingFirewallViolation
s@NetworkFirewallMissingFirewallViolation' {} Maybe Text
a -> NetworkFirewallMissingFirewallViolation
s {$sel:targetViolationReason:NetworkFirewallMissingFirewallViolation' :: Maybe Text
targetViolationReason = Maybe Text
a} :: NetworkFirewallMissingFirewallViolation)

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

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

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

instance
  Core.FromJSON
    NetworkFirewallMissingFirewallViolation
  where
  parseJSON :: Value -> Parser NetworkFirewallMissingFirewallViolation
parseJSON =
    String
-> (Object -> Parser NetworkFirewallMissingFirewallViolation)
-> Value
-> Parser NetworkFirewallMissingFirewallViolation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NetworkFirewallMissingFirewallViolation"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkFirewallMissingFirewallViolation
NetworkFirewallMissingFirewallViolation'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> NetworkFirewallMissingFirewallViolation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> NetworkFirewallMissingFirewallViolation)
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
"TargetViolationReason")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> NetworkFirewallMissingFirewallViolation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> NetworkFirewallMissingFirewallViolation)
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 -> NetworkFirewallMissingFirewallViolation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NetworkFirewallMissingFirewallViolation)
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 -> NetworkFirewallMissingFirewallViolation)
-> Parser (Maybe Text)
-> Parser NetworkFirewallMissingFirewallViolation
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")
      )

instance
  Prelude.Hashable
    NetworkFirewallMissingFirewallViolation

instance
  Prelude.NFData
    NetworkFirewallMissingFirewallViolation