{-# 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.AwsEc2SecurityGroupIpPermission where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEc2SecurityGroupIpRange
import Amazonka.SecurityHub.Types.AwsEc2SecurityGroupIpv6Range
import Amazonka.SecurityHub.Types.AwsEc2SecurityGroupPrefixListId
import Amazonka.SecurityHub.Types.AwsEc2SecurityGroupUserIdGroupPair
data AwsEc2SecurityGroupIpPermission = AwsEc2SecurityGroupIpPermission'
{
AwsEc2SecurityGroupIpPermission -> Maybe Int
fromPort :: Prelude.Maybe Prelude.Int,
AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs :: Prelude.Maybe [AwsEc2SecurityGroupUserIdGroupPair],
AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds :: Prelude.Maybe [AwsEc2SecurityGroupPrefixListId],
AwsEc2SecurityGroupIpPermission -> Maybe Text
ipProtocol :: Prelude.Maybe Prelude.Text,
AwsEc2SecurityGroupIpPermission -> Maybe Int
toPort :: Prelude.Maybe Prelude.Int,
AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges :: Prelude.Maybe [AwsEc2SecurityGroupIpv6Range],
AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpRange]
ipRanges :: Prelude.Maybe [AwsEc2SecurityGroupIpRange]
}
deriving (AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool
(AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool)
-> (AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool)
-> Eq AwsEc2SecurityGroupIpPermission
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool
$c/= :: AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool
== :: AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool
$c== :: AwsEc2SecurityGroupIpPermission
-> AwsEc2SecurityGroupIpPermission -> Bool
Prelude.Eq, ReadPrec [AwsEc2SecurityGroupIpPermission]
ReadPrec AwsEc2SecurityGroupIpPermission
Int -> ReadS AwsEc2SecurityGroupIpPermission
ReadS [AwsEc2SecurityGroupIpPermission]
(Int -> ReadS AwsEc2SecurityGroupIpPermission)
-> ReadS [AwsEc2SecurityGroupIpPermission]
-> ReadPrec AwsEc2SecurityGroupIpPermission
-> ReadPrec [AwsEc2SecurityGroupIpPermission]
-> Read AwsEc2SecurityGroupIpPermission
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEc2SecurityGroupIpPermission]
$creadListPrec :: ReadPrec [AwsEc2SecurityGroupIpPermission]
readPrec :: ReadPrec AwsEc2SecurityGroupIpPermission
$creadPrec :: ReadPrec AwsEc2SecurityGroupIpPermission
readList :: ReadS [AwsEc2SecurityGroupIpPermission]
$creadList :: ReadS [AwsEc2SecurityGroupIpPermission]
readsPrec :: Int -> ReadS AwsEc2SecurityGroupIpPermission
$creadsPrec :: Int -> ReadS AwsEc2SecurityGroupIpPermission
Prelude.Read, Int -> AwsEc2SecurityGroupIpPermission -> ShowS
[AwsEc2SecurityGroupIpPermission] -> ShowS
AwsEc2SecurityGroupIpPermission -> String
(Int -> AwsEc2SecurityGroupIpPermission -> ShowS)
-> (AwsEc2SecurityGroupIpPermission -> String)
-> ([AwsEc2SecurityGroupIpPermission] -> ShowS)
-> Show AwsEc2SecurityGroupIpPermission
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEc2SecurityGroupIpPermission] -> ShowS
$cshowList :: [AwsEc2SecurityGroupIpPermission] -> ShowS
show :: AwsEc2SecurityGroupIpPermission -> String
$cshow :: AwsEc2SecurityGroupIpPermission -> String
showsPrec :: Int -> AwsEc2SecurityGroupIpPermission -> ShowS
$cshowsPrec :: Int -> AwsEc2SecurityGroupIpPermission -> ShowS
Prelude.Show, (forall x.
AwsEc2SecurityGroupIpPermission
-> Rep AwsEc2SecurityGroupIpPermission x)
-> (forall x.
Rep AwsEc2SecurityGroupIpPermission x
-> AwsEc2SecurityGroupIpPermission)
-> Generic AwsEc2SecurityGroupIpPermission
forall x.
Rep AwsEc2SecurityGroupIpPermission x
-> AwsEc2SecurityGroupIpPermission
forall x.
AwsEc2SecurityGroupIpPermission
-> Rep AwsEc2SecurityGroupIpPermission x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEc2SecurityGroupIpPermission x
-> AwsEc2SecurityGroupIpPermission
$cfrom :: forall x.
AwsEc2SecurityGroupIpPermission
-> Rep AwsEc2SecurityGroupIpPermission x
Prelude.Generic)
newAwsEc2SecurityGroupIpPermission ::
AwsEc2SecurityGroupIpPermission
newAwsEc2SecurityGroupIpPermission :: AwsEc2SecurityGroupIpPermission
newAwsEc2SecurityGroupIpPermission =
AwsEc2SecurityGroupIpPermission' :: Maybe Int
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission'
{ $sel:fromPort:AwsEc2SecurityGroupIpPermission' :: Maybe Int
fromPort =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:userIdGroupPairs:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs = Maybe [AwsEc2SecurityGroupUserIdGroupPair]
forall a. Maybe a
Prelude.Nothing,
$sel:prefixListIds:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds = Maybe [AwsEc2SecurityGroupPrefixListId]
forall a. Maybe a
Prelude.Nothing,
$sel:ipProtocol:AwsEc2SecurityGroupIpPermission' :: Maybe Text
ipProtocol = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:toPort:AwsEc2SecurityGroupIpPermission' :: Maybe Int
toPort = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:ipv6Ranges:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges = Maybe [AwsEc2SecurityGroupIpv6Range]
forall a. Maybe a
Prelude.Nothing,
$sel:ipRanges:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupIpRange]
ipRanges = Maybe [AwsEc2SecurityGroupIpRange]
forall a. Maybe a
Prelude.Nothing
}
awsEc2SecurityGroupIpPermission_fromPort :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe Prelude.Int)
awsEc2SecurityGroupIpPermission_fromPort :: (Maybe Int -> f (Maybe Int))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_fromPort = (AwsEc2SecurityGroupIpPermission -> Maybe Int)
-> (AwsEc2SecurityGroupIpPermission
-> Maybe Int -> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe Int
fromPort :: Maybe Int
$sel:fromPort:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission -> Maybe Int
fromPort} -> Maybe Int
fromPort) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe Int
a -> AwsEc2SecurityGroupIpPermission
s {$sel:fromPort:AwsEc2SecurityGroupIpPermission' :: Maybe Int
fromPort = Maybe Int
a} :: AwsEc2SecurityGroupIpPermission)
awsEc2SecurityGroupIpPermission_userIdGroupPairs :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe [AwsEc2SecurityGroupUserIdGroupPair])
awsEc2SecurityGroupIpPermission_userIdGroupPairs :: (Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> f (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_userIdGroupPairs = (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair])
-> (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe [AwsEc2SecurityGroupUserIdGroupPair])
(Maybe [AwsEc2SecurityGroupUserIdGroupPair])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs :: Maybe [AwsEc2SecurityGroupUserIdGroupPair]
$sel:userIdGroupPairs:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs} -> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe [AwsEc2SecurityGroupUserIdGroupPair]
a -> AwsEc2SecurityGroupIpPermission
s {$sel:userIdGroupPairs:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs = Maybe [AwsEc2SecurityGroupUserIdGroupPair]
a} :: AwsEc2SecurityGroupIpPermission) ((Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> f (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission)
-> ((Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> f (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> f (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
-> (Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> f (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEc2SecurityGroupUserIdGroupPair]
[AwsEc2SecurityGroupUserIdGroupPair]
[AwsEc2SecurityGroupUserIdGroupPair]
[AwsEc2SecurityGroupUserIdGroupPair]
-> Iso
(Maybe [AwsEc2SecurityGroupUserIdGroupPair])
(Maybe [AwsEc2SecurityGroupUserIdGroupPair])
(Maybe [AwsEc2SecurityGroupUserIdGroupPair])
(Maybe [AwsEc2SecurityGroupUserIdGroupPair])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsEc2SecurityGroupUserIdGroupPair]
[AwsEc2SecurityGroupUserIdGroupPair]
[AwsEc2SecurityGroupUserIdGroupPair]
[AwsEc2SecurityGroupUserIdGroupPair]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsEc2SecurityGroupIpPermission_prefixListIds :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe [AwsEc2SecurityGroupPrefixListId])
awsEc2SecurityGroupIpPermission_prefixListIds :: (Maybe [AwsEc2SecurityGroupPrefixListId]
-> f (Maybe [AwsEc2SecurityGroupPrefixListId]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_prefixListIds = (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupPrefixListId])
-> (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe [AwsEc2SecurityGroupPrefixListId])
(Maybe [AwsEc2SecurityGroupPrefixListId])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds :: Maybe [AwsEc2SecurityGroupPrefixListId]
$sel:prefixListIds:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds} -> Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe [AwsEc2SecurityGroupPrefixListId]
a -> AwsEc2SecurityGroupIpPermission
s {$sel:prefixListIds:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds = Maybe [AwsEc2SecurityGroupPrefixListId]
a} :: AwsEc2SecurityGroupIpPermission) ((Maybe [AwsEc2SecurityGroupPrefixListId]
-> f (Maybe [AwsEc2SecurityGroupPrefixListId]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission)
-> ((Maybe [AwsEc2SecurityGroupPrefixListId]
-> f (Maybe [AwsEc2SecurityGroupPrefixListId]))
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> f (Maybe [AwsEc2SecurityGroupPrefixListId]))
-> (Maybe [AwsEc2SecurityGroupPrefixListId]
-> f (Maybe [AwsEc2SecurityGroupPrefixListId]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEc2SecurityGroupPrefixListId]
[AwsEc2SecurityGroupPrefixListId]
[AwsEc2SecurityGroupPrefixListId]
[AwsEc2SecurityGroupPrefixListId]
-> Iso
(Maybe [AwsEc2SecurityGroupPrefixListId])
(Maybe [AwsEc2SecurityGroupPrefixListId])
(Maybe [AwsEc2SecurityGroupPrefixListId])
(Maybe [AwsEc2SecurityGroupPrefixListId])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsEc2SecurityGroupPrefixListId]
[AwsEc2SecurityGroupPrefixListId]
[AwsEc2SecurityGroupPrefixListId]
[AwsEc2SecurityGroupPrefixListId]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsEc2SecurityGroupIpPermission_ipProtocol :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe Prelude.Text)
awsEc2SecurityGroupIpPermission_ipProtocol :: (Maybe Text -> f (Maybe Text))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_ipProtocol = (AwsEc2SecurityGroupIpPermission -> Maybe Text)
-> (AwsEc2SecurityGroupIpPermission
-> Maybe Text -> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe Text
ipProtocol :: Maybe Text
$sel:ipProtocol:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission -> Maybe Text
ipProtocol} -> Maybe Text
ipProtocol) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe Text
a -> AwsEc2SecurityGroupIpPermission
s {$sel:ipProtocol:AwsEc2SecurityGroupIpPermission' :: Maybe Text
ipProtocol = Maybe Text
a} :: AwsEc2SecurityGroupIpPermission)
awsEc2SecurityGroupIpPermission_toPort :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe Prelude.Int)
awsEc2SecurityGroupIpPermission_toPort :: (Maybe Int -> f (Maybe Int))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_toPort = (AwsEc2SecurityGroupIpPermission -> Maybe Int)
-> (AwsEc2SecurityGroupIpPermission
-> Maybe Int -> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe Int
toPort :: Maybe Int
$sel:toPort:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission -> Maybe Int
toPort} -> Maybe Int
toPort) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe Int
a -> AwsEc2SecurityGroupIpPermission
s {$sel:toPort:AwsEc2SecurityGroupIpPermission' :: Maybe Int
toPort = Maybe Int
a} :: AwsEc2SecurityGroupIpPermission)
awsEc2SecurityGroupIpPermission_ipv6Ranges :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe [AwsEc2SecurityGroupIpv6Range])
awsEc2SecurityGroupIpPermission_ipv6Ranges :: (Maybe [AwsEc2SecurityGroupIpv6Range]
-> f (Maybe [AwsEc2SecurityGroupIpv6Range]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_ipv6Ranges = (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpv6Range])
-> (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe [AwsEc2SecurityGroupIpv6Range])
(Maybe [AwsEc2SecurityGroupIpv6Range])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges :: Maybe [AwsEc2SecurityGroupIpv6Range]
$sel:ipv6Ranges:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges} -> Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe [AwsEc2SecurityGroupIpv6Range]
a -> AwsEc2SecurityGroupIpPermission
s {$sel:ipv6Ranges:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges = Maybe [AwsEc2SecurityGroupIpv6Range]
a} :: AwsEc2SecurityGroupIpPermission) ((Maybe [AwsEc2SecurityGroupIpv6Range]
-> f (Maybe [AwsEc2SecurityGroupIpv6Range]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission)
-> ((Maybe [AwsEc2SecurityGroupIpv6Range]
-> f (Maybe [AwsEc2SecurityGroupIpv6Range]))
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> f (Maybe [AwsEc2SecurityGroupIpv6Range]))
-> (Maybe [AwsEc2SecurityGroupIpv6Range]
-> f (Maybe [AwsEc2SecurityGroupIpv6Range]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEc2SecurityGroupIpv6Range]
[AwsEc2SecurityGroupIpv6Range]
[AwsEc2SecurityGroupIpv6Range]
[AwsEc2SecurityGroupIpv6Range]
-> Iso
(Maybe [AwsEc2SecurityGroupIpv6Range])
(Maybe [AwsEc2SecurityGroupIpv6Range])
(Maybe [AwsEc2SecurityGroupIpv6Range])
(Maybe [AwsEc2SecurityGroupIpv6Range])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsEc2SecurityGroupIpv6Range]
[AwsEc2SecurityGroupIpv6Range]
[AwsEc2SecurityGroupIpv6Range]
[AwsEc2SecurityGroupIpv6Range]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsEc2SecurityGroupIpPermission_ipRanges :: Lens.Lens' AwsEc2SecurityGroupIpPermission (Prelude.Maybe [AwsEc2SecurityGroupIpRange])
awsEc2SecurityGroupIpPermission_ipRanges :: (Maybe [AwsEc2SecurityGroupIpRange]
-> f (Maybe [AwsEc2SecurityGroupIpRange]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
awsEc2SecurityGroupIpPermission_ipRanges = (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpRange])
-> (AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Lens
AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission
(Maybe [AwsEc2SecurityGroupIpRange])
(Maybe [AwsEc2SecurityGroupIpRange])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2SecurityGroupIpPermission' {Maybe [AwsEc2SecurityGroupIpRange]
ipRanges :: Maybe [AwsEc2SecurityGroupIpRange]
$sel:ipRanges:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpRange]
ipRanges} -> Maybe [AwsEc2SecurityGroupIpRange]
ipRanges) (\s :: AwsEc2SecurityGroupIpPermission
s@AwsEc2SecurityGroupIpPermission' {} Maybe [AwsEc2SecurityGroupIpRange]
a -> AwsEc2SecurityGroupIpPermission
s {$sel:ipRanges:AwsEc2SecurityGroupIpPermission' :: Maybe [AwsEc2SecurityGroupIpRange]
ipRanges = Maybe [AwsEc2SecurityGroupIpRange]
a} :: AwsEc2SecurityGroupIpPermission) ((Maybe [AwsEc2SecurityGroupIpRange]
-> f (Maybe [AwsEc2SecurityGroupIpRange]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission)
-> ((Maybe [AwsEc2SecurityGroupIpRange]
-> f (Maybe [AwsEc2SecurityGroupIpRange]))
-> Maybe [AwsEc2SecurityGroupIpRange]
-> f (Maybe [AwsEc2SecurityGroupIpRange]))
-> (Maybe [AwsEc2SecurityGroupIpRange]
-> f (Maybe [AwsEc2SecurityGroupIpRange]))
-> AwsEc2SecurityGroupIpPermission
-> f AwsEc2SecurityGroupIpPermission
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEc2SecurityGroupIpRange]
[AwsEc2SecurityGroupIpRange]
[AwsEc2SecurityGroupIpRange]
[AwsEc2SecurityGroupIpRange]
-> Iso
(Maybe [AwsEc2SecurityGroupIpRange])
(Maybe [AwsEc2SecurityGroupIpRange])
(Maybe [AwsEc2SecurityGroupIpRange])
(Maybe [AwsEc2SecurityGroupIpRange])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsEc2SecurityGroupIpRange]
[AwsEc2SecurityGroupIpRange]
[AwsEc2SecurityGroupIpRange]
[AwsEc2SecurityGroupIpRange]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
AwsEc2SecurityGroupIpPermission
where
parseJSON :: Value -> Parser AwsEc2SecurityGroupIpPermission
parseJSON =
String
-> (Object -> Parser AwsEc2SecurityGroupIpPermission)
-> Value
-> Parser AwsEc2SecurityGroupIpPermission
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEc2SecurityGroupIpPermission"
( \Object
x ->
Maybe Int
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission
AwsEc2SecurityGroupIpPermission'
(Maybe Int
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe Int)
-> Parser
(Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FromPort")
Parser
(Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe [AwsEc2SecurityGroupUserIdGroupPair])
-> Parser
(Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserIdGroupPairs"
Parser (Maybe (Maybe [AwsEc2SecurityGroupUserIdGroupPair]))
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
-> Parser (Maybe [AwsEc2SecurityGroupUserIdGroupPair])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2SecurityGroupUserIdGroupPair]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [AwsEc2SecurityGroupPrefixListId]
-> Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe [AwsEc2SecurityGroupPrefixListId])
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsEc2SecurityGroupPrefixListId]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PrefixListIds" Parser (Maybe (Maybe [AwsEc2SecurityGroupPrefixListId]))
-> Maybe [AwsEc2SecurityGroupPrefixListId]
-> Parser (Maybe [AwsEc2SecurityGroupPrefixListId])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2SecurityGroupPrefixListId]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
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
"IpProtocol")
Parser
(Maybe Int
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe Int)
-> Parser
(Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ToPort")
Parser
(Maybe [AwsEc2SecurityGroupIpv6Range]
-> Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe [AwsEc2SecurityGroupIpv6Range])
-> Parser
(Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsEc2SecurityGroupIpv6Range]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Ipv6Ranges" Parser (Maybe (Maybe [AwsEc2SecurityGroupIpv6Range]))
-> Maybe [AwsEc2SecurityGroupIpv6Range]
-> Parser (Maybe [AwsEc2SecurityGroupIpv6Range])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2SecurityGroupIpv6Range]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe [AwsEc2SecurityGroupIpRange]
-> AwsEc2SecurityGroupIpPermission)
-> Parser (Maybe [AwsEc2SecurityGroupIpRange])
-> Parser AwsEc2SecurityGroupIpPermission
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsEc2SecurityGroupIpRange]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IpRanges" Parser (Maybe (Maybe [AwsEc2SecurityGroupIpRange]))
-> Maybe [AwsEc2SecurityGroupIpRange]
-> Parser (Maybe [AwsEc2SecurityGroupIpRange])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2SecurityGroupIpRange]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
AwsEc2SecurityGroupIpPermission
instance
Prelude.NFData
AwsEc2SecurityGroupIpPermission
instance Core.ToJSON AwsEc2SecurityGroupIpPermission where
toJSON :: AwsEc2SecurityGroupIpPermission -> Value
toJSON AwsEc2SecurityGroupIpPermission' {Maybe Int
Maybe [AwsEc2SecurityGroupIpRange]
Maybe [AwsEc2SecurityGroupIpv6Range]
Maybe [AwsEc2SecurityGroupPrefixListId]
Maybe [AwsEc2SecurityGroupUserIdGroupPair]
Maybe Text
ipRanges :: Maybe [AwsEc2SecurityGroupIpRange]
ipv6Ranges :: Maybe [AwsEc2SecurityGroupIpv6Range]
toPort :: Maybe Int
ipProtocol :: Maybe Text
prefixListIds :: Maybe [AwsEc2SecurityGroupPrefixListId]
userIdGroupPairs :: Maybe [AwsEc2SecurityGroupUserIdGroupPair]
fromPort :: Maybe Int
$sel:ipRanges:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpRange]
$sel:ipv6Ranges:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupIpv6Range]
$sel:toPort:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission -> Maybe Int
$sel:ipProtocol:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission -> Maybe Text
$sel:prefixListIds:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupPrefixListId]
$sel:userIdGroupPairs:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
$sel:fromPort:AwsEc2SecurityGroupIpPermission' :: AwsEc2SecurityGroupIpPermission -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FromPort" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
fromPort,
(Text
"UserIdGroupPairs" Text -> [AwsEc2SecurityGroupUserIdGroupPair] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AwsEc2SecurityGroupUserIdGroupPair] -> Pair)
-> Maybe [AwsEc2SecurityGroupUserIdGroupPair] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2SecurityGroupUserIdGroupPair]
userIdGroupPairs,
(Text
"PrefixListIds" Text -> [AwsEc2SecurityGroupPrefixListId] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2SecurityGroupPrefixListId] -> Pair)
-> Maybe [AwsEc2SecurityGroupPrefixListId] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2SecurityGroupPrefixListId]
prefixListIds,
(Text
"IpProtocol" 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
ipProtocol,
(Text
"ToPort" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
toPort,
(Text
"Ipv6Ranges" Text -> [AwsEc2SecurityGroupIpv6Range] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2SecurityGroupIpv6Range] -> Pair)
-> Maybe [AwsEc2SecurityGroupIpv6Range] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2SecurityGroupIpv6Range]
ipv6Ranges,
(Text
"IpRanges" Text -> [AwsEc2SecurityGroupIpRange] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2SecurityGroupIpRange] -> Pair)
-> Maybe [AwsEc2SecurityGroupIpRange] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2SecurityGroupIpRange]
ipRanges
]
)