{-# 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 #-}
module Amazonka.SecurityHub.Types.AwsEc2SecurityGroupPrefixListId where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsEc2SecurityGroupPrefixListId = AwsEc2SecurityGroupPrefixListId'
{
AwsEc2SecurityGroupPrefixListId -> Maybe Text
prefixListId :: Prelude.Maybe Prelude.Text
}
deriving (AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool
(AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool)
-> (AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool)
-> Eq AwsEc2SecurityGroupPrefixListId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool
$c/= :: AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool
== :: AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool
$c== :: AwsEc2SecurityGroupPrefixListId
-> AwsEc2SecurityGroupPrefixListId -> Bool
Prelude.Eq, ReadPrec [AwsEc2SecurityGroupPrefixListId]
ReadPrec AwsEc2SecurityGroupPrefixListId
Int -> ReadS AwsEc2SecurityGroupPrefixListId
ReadS [AwsEc2SecurityGroupPrefixListId]
(Int -> ReadS AwsEc2SecurityGroupPrefixListId)
-> ReadS [AwsEc2SecurityGroupPrefixListId]
-> ReadPrec AwsEc2SecurityGroupPrefixListId
-> ReadPrec [AwsEc2SecurityGroupPrefixListId]
-> Read AwsEc2SecurityGroupPrefixListId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEc2SecurityGroupPrefixListId]
$creadListPrec :: ReadPrec [AwsEc2SecurityGroupPrefixListId]
readPrec :: ReadPrec AwsEc2SecurityGroupPrefixListId
$creadPrec :: ReadPrec AwsEc2SecurityGroupPrefixListId
readList :: ReadS [AwsEc2SecurityGroupPrefixListId]
$creadList :: ReadS [AwsEc2SecurityGroupPrefixListId]
readsPrec :: Int -> ReadS AwsEc2SecurityGroupPrefixListId
$creadsPrec :: Int -> ReadS AwsEc2SecurityGroupPrefixListId
Prelude.Read, Int -> AwsEc2SecurityGroupPrefixListId -> ShowS
[AwsEc2SecurityGroupPrefixListId] -> ShowS
AwsEc2SecurityGroupPrefixListId -> String
(Int -> AwsEc2SecurityGroupPrefixListId -> ShowS)
-> (AwsEc2SecurityGroupPrefixListId -> String)
-> ([AwsEc2SecurityGroupPrefixListId] -> ShowS)
-> Show AwsEc2SecurityGroupPrefixListId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEc2SecurityGroupPrefixListId] -> ShowS
$cshowList :: [AwsEc2SecurityGroupPrefixListId] -> ShowS
show :: AwsEc2SecurityGroupPrefixListId -> String
$cshow :: AwsEc2SecurityGroupPrefixListId -> String
showsPrec :: Int -> AwsEc2SecurityGroupPrefixListId -> ShowS
$cshowsPrec :: Int -> AwsEc2SecurityGroupPrefixListId -> ShowS
Prelude.Show, (forall x.
AwsEc2SecurityGroupPrefixListId
-> Rep AwsEc2SecurityGroupPrefixListId x)
-> (forall x.
Rep AwsEc2SecurityGroupPrefixListId x
-> AwsEc2SecurityGroupPrefixListId)
-> Generic AwsEc2SecurityGroupPrefixListId
forall x.
Rep AwsEc2SecurityGroupPrefixListId x
-> AwsEc2SecurityGroupPrefixListId
forall x.
AwsEc2SecurityGroupPrefixListId
-> Rep AwsEc2SecurityGroupPrefixListId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEc2SecurityGroupPrefixListId x
-> AwsEc2SecurityGroupPrefixListId
$cfrom :: forall x.
AwsEc2SecurityGroupPrefixListId
-> Rep AwsEc2SecurityGroupPrefixListId x
Prelude.Generic)
newAwsEc2SecurityGroupPrefixListId ::
AwsEc2SecurityGroupPrefixListId
newAwsEc2SecurityGroupPrefixListId :: AwsEc2SecurityGroupPrefixListId
newAwsEc2SecurityGroupPrefixListId =
AwsEc2SecurityGroupPrefixListId' :: Maybe Text -> AwsEc2SecurityGroupPrefixListId
AwsEc2SecurityGroupPrefixListId'
{ $sel:prefixListId:AwsEc2SecurityGroupPrefixListId' :: Maybe Text
prefixListId =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsEc2SecurityGroupPrefixListId_prefixListId :: Lens.Lens' AwsEc2SecurityGroupPrefixListId (Prelude.Maybe Prelude.Text)
awsEc2SecurityGroupPrefixListId_prefixListId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2SecurityGroupPrefixListId
-> f AwsEc2SecurityGroupPrefixListId
awsEc2SecurityGroupPrefixListId_prefixListId = (AwsEc2SecurityGroupPrefixListId -> Maybe Text)
-> (AwsEc2SecurityGroupPrefixListId
-> Maybe Text -> AwsEc2SecurityGroupPrefixListId)
-> Lens
AwsEc2SecurityGroupPrefixListId
AwsEc2SecurityGroupPrefixListId
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupPrefixListId' {Maybe Text
prefixListId :: Maybe Text
$sel:prefixListId:AwsEc2SecurityGroupPrefixListId' :: AwsEc2SecurityGroupPrefixListId -> Maybe Text
prefixListId} -> Maybe Text
prefixListId) (\s :: AwsEc2SecurityGroupPrefixListId
s@AwsEc2SecurityGroupPrefixListId' {} Maybe Text
a -> AwsEc2SecurityGroupPrefixListId
s {$sel:prefixListId:AwsEc2SecurityGroupPrefixListId' :: Maybe Text
prefixListId = Maybe Text
a} :: AwsEc2SecurityGroupPrefixListId)
instance
Core.FromJSON
AwsEc2SecurityGroupPrefixListId
where
parseJSON :: Value -> Parser AwsEc2SecurityGroupPrefixListId
parseJSON =
String
-> (Object -> Parser AwsEc2SecurityGroupPrefixListId)
-> Value
-> Parser AwsEc2SecurityGroupPrefixListId
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEc2SecurityGroupPrefixListId"
( \Object
x ->
Maybe Text -> AwsEc2SecurityGroupPrefixListId
AwsEc2SecurityGroupPrefixListId'
(Maybe Text -> AwsEc2SecurityGroupPrefixListId)
-> Parser (Maybe Text) -> Parser AwsEc2SecurityGroupPrefixListId
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
"PrefixListId")
)
instance
Prelude.Hashable
AwsEc2SecurityGroupPrefixListId
instance
Prelude.NFData
AwsEc2SecurityGroupPrefixListId
instance Core.ToJSON AwsEc2SecurityGroupPrefixListId where
toJSON :: AwsEc2SecurityGroupPrefixListId -> Value
toJSON AwsEc2SecurityGroupPrefixListId' {Maybe Text
prefixListId :: Maybe Text
$sel:prefixListId:AwsEc2SecurityGroupPrefixListId' :: AwsEc2SecurityGroupPrefixListId -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"PrefixListId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
prefixListId]
)