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