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