{-# 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.FirewallSubnetIsOutOfScopeViolation
-- 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.FirewallSubnetIsOutOfScopeViolation 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

-- | Contains details about the firewall subnet that violates the policy
-- scope.
--
-- /See:/ 'newFirewallSubnetIsOutOfScopeViolation' smart constructor.
data FirewallSubnetIsOutOfScopeViolation = FirewallSubnetIsOutOfScopeViolation'
  { -- | The ID of the firewall subnet that violates the policy scope.
    FirewallSubnetIsOutOfScopeViolation -> Maybe Text
firewallSubnetId :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone of the firewall subnet that violates the policy
    -- scope.
    FirewallSubnetIsOutOfScopeViolation -> Maybe Text
subnetAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone ID of the firewall subnet that violates the policy
    -- scope.
    FirewallSubnetIsOutOfScopeViolation -> Maybe Text
subnetAvailabilityZoneId :: Prelude.Maybe Prelude.Text,
    -- | The VPC endpoint ID of the firewall subnet that violates the policy
    -- scope.
    FirewallSubnetIsOutOfScopeViolation -> Maybe Text
vpcEndpointId :: Prelude.Maybe Prelude.Text,
    -- | The VPC ID of the firewall subnet that violates the policy scope.
    FirewallSubnetIsOutOfScopeViolation -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
  }
  deriving (FirewallSubnetIsOutOfScopeViolation
-> FirewallSubnetIsOutOfScopeViolation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FirewallSubnetIsOutOfScopeViolation
-> FirewallSubnetIsOutOfScopeViolation -> Bool
$c/= :: FirewallSubnetIsOutOfScopeViolation
-> FirewallSubnetIsOutOfScopeViolation -> Bool
== :: FirewallSubnetIsOutOfScopeViolation
-> FirewallSubnetIsOutOfScopeViolation -> Bool
$c== :: FirewallSubnetIsOutOfScopeViolation
-> FirewallSubnetIsOutOfScopeViolation -> Bool
Prelude.Eq, ReadPrec [FirewallSubnetIsOutOfScopeViolation]
ReadPrec FirewallSubnetIsOutOfScopeViolation
Int -> ReadS FirewallSubnetIsOutOfScopeViolation
ReadS [FirewallSubnetIsOutOfScopeViolation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FirewallSubnetIsOutOfScopeViolation]
$creadListPrec :: ReadPrec [FirewallSubnetIsOutOfScopeViolation]
readPrec :: ReadPrec FirewallSubnetIsOutOfScopeViolation
$creadPrec :: ReadPrec FirewallSubnetIsOutOfScopeViolation
readList :: ReadS [FirewallSubnetIsOutOfScopeViolation]
$creadList :: ReadS [FirewallSubnetIsOutOfScopeViolation]
readsPrec :: Int -> ReadS FirewallSubnetIsOutOfScopeViolation
$creadsPrec :: Int -> ReadS FirewallSubnetIsOutOfScopeViolation
Prelude.Read, Int -> FirewallSubnetIsOutOfScopeViolation -> ShowS
[FirewallSubnetIsOutOfScopeViolation] -> ShowS
FirewallSubnetIsOutOfScopeViolation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FirewallSubnetIsOutOfScopeViolation] -> ShowS
$cshowList :: [FirewallSubnetIsOutOfScopeViolation] -> ShowS
show :: FirewallSubnetIsOutOfScopeViolation -> String
$cshow :: FirewallSubnetIsOutOfScopeViolation -> String
showsPrec :: Int -> FirewallSubnetIsOutOfScopeViolation -> ShowS
$cshowsPrec :: Int -> FirewallSubnetIsOutOfScopeViolation -> ShowS
Prelude.Show, forall x.
Rep FirewallSubnetIsOutOfScopeViolation x
-> FirewallSubnetIsOutOfScopeViolation
forall x.
FirewallSubnetIsOutOfScopeViolation
-> Rep FirewallSubnetIsOutOfScopeViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FirewallSubnetIsOutOfScopeViolation x
-> FirewallSubnetIsOutOfScopeViolation
$cfrom :: forall x.
FirewallSubnetIsOutOfScopeViolation
-> Rep FirewallSubnetIsOutOfScopeViolation x
Prelude.Generic)

-- |
-- Create a value of 'FirewallSubnetIsOutOfScopeViolation' 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:
--
-- 'firewallSubnetId', 'firewallSubnetIsOutOfScopeViolation_firewallSubnetId' - The ID of the firewall subnet that violates the policy scope.
--
-- 'subnetAvailabilityZone', 'firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZone' - The Availability Zone of the firewall subnet that violates the policy
-- scope.
--
-- 'subnetAvailabilityZoneId', 'firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZoneId' - The Availability Zone ID of the firewall subnet that violates the policy
-- scope.
--
-- 'vpcEndpointId', 'firewallSubnetIsOutOfScopeViolation_vpcEndpointId' - The VPC endpoint ID of the firewall subnet that violates the policy
-- scope.
--
-- 'vpcId', 'firewallSubnetIsOutOfScopeViolation_vpcId' - The VPC ID of the firewall subnet that violates the policy scope.
newFirewallSubnetIsOutOfScopeViolation ::
  FirewallSubnetIsOutOfScopeViolation
newFirewallSubnetIsOutOfScopeViolation :: FirewallSubnetIsOutOfScopeViolation
newFirewallSubnetIsOutOfScopeViolation =
  FirewallSubnetIsOutOfScopeViolation'
    { $sel:firewallSubnetId:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
firewallSubnetId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetAvailabilityZone:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
subnetAvailabilityZone =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetAvailabilityZoneId:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
subnetAvailabilityZoneId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:vpcEndpointId:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
vpcEndpointId = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The Availability Zone of the firewall subnet that violates the policy
-- scope.
firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZone :: Lens.Lens' FirewallSubnetIsOutOfScopeViolation (Prelude.Maybe Prelude.Text)
firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZone :: Lens' FirewallSubnetIsOutOfScopeViolation (Maybe Text)
firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallSubnetIsOutOfScopeViolation' {Maybe Text
subnetAvailabilityZone :: Maybe Text
$sel:subnetAvailabilityZone:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
subnetAvailabilityZone} -> Maybe Text
subnetAvailabilityZone) (\s :: FirewallSubnetIsOutOfScopeViolation
s@FirewallSubnetIsOutOfScopeViolation' {} Maybe Text
a -> FirewallSubnetIsOutOfScopeViolation
s {$sel:subnetAvailabilityZone:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
subnetAvailabilityZone = Maybe Text
a} :: FirewallSubnetIsOutOfScopeViolation)

-- | The Availability Zone ID of the firewall subnet that violates the policy
-- scope.
firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZoneId :: Lens.Lens' FirewallSubnetIsOutOfScopeViolation (Prelude.Maybe Prelude.Text)
firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZoneId :: Lens' FirewallSubnetIsOutOfScopeViolation (Maybe Text)
firewallSubnetIsOutOfScopeViolation_subnetAvailabilityZoneId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallSubnetIsOutOfScopeViolation' {Maybe Text
subnetAvailabilityZoneId :: Maybe Text
$sel:subnetAvailabilityZoneId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
subnetAvailabilityZoneId} -> Maybe Text
subnetAvailabilityZoneId) (\s :: FirewallSubnetIsOutOfScopeViolation
s@FirewallSubnetIsOutOfScopeViolation' {} Maybe Text
a -> FirewallSubnetIsOutOfScopeViolation
s {$sel:subnetAvailabilityZoneId:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
subnetAvailabilityZoneId = Maybe Text
a} :: FirewallSubnetIsOutOfScopeViolation)

-- | The VPC endpoint ID of the firewall subnet that violates the policy
-- scope.
firewallSubnetIsOutOfScopeViolation_vpcEndpointId :: Lens.Lens' FirewallSubnetIsOutOfScopeViolation (Prelude.Maybe Prelude.Text)
firewallSubnetIsOutOfScopeViolation_vpcEndpointId :: Lens' FirewallSubnetIsOutOfScopeViolation (Maybe Text)
firewallSubnetIsOutOfScopeViolation_vpcEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallSubnetIsOutOfScopeViolation' {Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcEndpointId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
vpcEndpointId} -> Maybe Text
vpcEndpointId) (\s :: FirewallSubnetIsOutOfScopeViolation
s@FirewallSubnetIsOutOfScopeViolation' {} Maybe Text
a -> FirewallSubnetIsOutOfScopeViolation
s {$sel:vpcEndpointId:FirewallSubnetIsOutOfScopeViolation' :: Maybe Text
vpcEndpointId = Maybe Text
a} :: FirewallSubnetIsOutOfScopeViolation)

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

instance
  Data.FromJSON
    FirewallSubnetIsOutOfScopeViolation
  where
  parseJSON :: Value -> Parser FirewallSubnetIsOutOfScopeViolation
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"FirewallSubnetIsOutOfScopeViolation"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallSubnetIsOutOfScopeViolation
FirewallSubnetIsOutOfScopeViolation'
            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
"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
"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
"VpcEndpointId")
            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
    FirewallSubnetIsOutOfScopeViolation
  where
  hashWithSalt :: Int -> FirewallSubnetIsOutOfScopeViolation -> Int
hashWithSalt
    Int
_salt
    FirewallSubnetIsOutOfScopeViolation' {Maybe Text
vpcId :: Maybe Text
vpcEndpointId :: Maybe Text
subnetAvailabilityZoneId :: Maybe Text
subnetAvailabilityZone :: Maybe Text
firewallSubnetId :: Maybe Text
$sel:vpcId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:vpcEndpointId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:subnetAvailabilityZoneId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:subnetAvailabilityZone:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:firewallSubnetId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firewallSubnetId
        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
vpcEndpointId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId

instance
  Prelude.NFData
    FirewallSubnetIsOutOfScopeViolation
  where
  rnf :: FirewallSubnetIsOutOfScopeViolation -> ()
rnf FirewallSubnetIsOutOfScopeViolation' {Maybe Text
vpcId :: Maybe Text
vpcEndpointId :: Maybe Text
subnetAvailabilityZoneId :: Maybe Text
subnetAvailabilityZone :: Maybe Text
firewallSubnetId :: Maybe Text
$sel:vpcId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:vpcEndpointId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:subnetAvailabilityZoneId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:subnetAvailabilityZone:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
$sel:firewallSubnetId:FirewallSubnetIsOutOfScopeViolation' :: FirewallSubnetIsOutOfScopeViolation -> Maybe Text
..} =
    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 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
vpcEndpointId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId