{-# 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.ELB.Types.SourceSecurityGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ELB.Internal
import qualified Amazonka.Prelude as Prelude
data SourceSecurityGroup = SourceSecurityGroup'
{
SourceSecurityGroup -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
SourceSecurityGroup -> Maybe Text
ownerAlias :: Prelude.Maybe Prelude.Text
}
deriving (SourceSecurityGroup -> SourceSecurityGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceSecurityGroup -> SourceSecurityGroup -> Bool
$c/= :: SourceSecurityGroup -> SourceSecurityGroup -> Bool
== :: SourceSecurityGroup -> SourceSecurityGroup -> Bool
$c== :: SourceSecurityGroup -> SourceSecurityGroup -> Bool
Prelude.Eq, ReadPrec [SourceSecurityGroup]
ReadPrec SourceSecurityGroup
Int -> ReadS SourceSecurityGroup
ReadS [SourceSecurityGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceSecurityGroup]
$creadListPrec :: ReadPrec [SourceSecurityGroup]
readPrec :: ReadPrec SourceSecurityGroup
$creadPrec :: ReadPrec SourceSecurityGroup
readList :: ReadS [SourceSecurityGroup]
$creadList :: ReadS [SourceSecurityGroup]
readsPrec :: Int -> ReadS SourceSecurityGroup
$creadsPrec :: Int -> ReadS SourceSecurityGroup
Prelude.Read, Int -> SourceSecurityGroup -> ShowS
[SourceSecurityGroup] -> ShowS
SourceSecurityGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceSecurityGroup] -> ShowS
$cshowList :: [SourceSecurityGroup] -> ShowS
show :: SourceSecurityGroup -> String
$cshow :: SourceSecurityGroup -> String
showsPrec :: Int -> SourceSecurityGroup -> ShowS
$cshowsPrec :: Int -> SourceSecurityGroup -> ShowS
Prelude.Show, forall x. Rep SourceSecurityGroup x -> SourceSecurityGroup
forall x. SourceSecurityGroup -> Rep SourceSecurityGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SourceSecurityGroup x -> SourceSecurityGroup
$cfrom :: forall x. SourceSecurityGroup -> Rep SourceSecurityGroup x
Prelude.Generic)
newSourceSecurityGroup ::
SourceSecurityGroup
newSourceSecurityGroup :: SourceSecurityGroup
newSourceSecurityGroup =
SourceSecurityGroup'
{ $sel:groupName:SourceSecurityGroup' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
$sel:ownerAlias:SourceSecurityGroup' :: Maybe Text
ownerAlias = forall a. Maybe a
Prelude.Nothing
}
sourceSecurityGroup_groupName :: Lens.Lens' SourceSecurityGroup (Prelude.Maybe Prelude.Text)
sourceSecurityGroup_groupName :: Lens' SourceSecurityGroup (Maybe Text)
sourceSecurityGroup_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceSecurityGroup' {Maybe Text
groupName :: Maybe Text
$sel:groupName:SourceSecurityGroup' :: SourceSecurityGroup -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: SourceSecurityGroup
s@SourceSecurityGroup' {} Maybe Text
a -> SourceSecurityGroup
s {$sel:groupName:SourceSecurityGroup' :: Maybe Text
groupName = Maybe Text
a} :: SourceSecurityGroup)
sourceSecurityGroup_ownerAlias :: Lens.Lens' SourceSecurityGroup (Prelude.Maybe Prelude.Text)
sourceSecurityGroup_ownerAlias :: Lens' SourceSecurityGroup (Maybe Text)
sourceSecurityGroup_ownerAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceSecurityGroup' {Maybe Text
ownerAlias :: Maybe Text
$sel:ownerAlias:SourceSecurityGroup' :: SourceSecurityGroup -> Maybe Text
ownerAlias} -> Maybe Text
ownerAlias) (\s :: SourceSecurityGroup
s@SourceSecurityGroup' {} Maybe Text
a -> SourceSecurityGroup
s {$sel:ownerAlias:SourceSecurityGroup' :: Maybe Text
ownerAlias = Maybe Text
a} :: SourceSecurityGroup)
instance Data.FromXML SourceSecurityGroup where
parseXML :: [Node] -> Either String SourceSecurityGroup
parseXML [Node]
x =
Maybe Text -> Maybe Text -> SourceSecurityGroup
SourceSecurityGroup'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"GroupName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"OwnerAlias")
instance Prelude.Hashable SourceSecurityGroup where
hashWithSalt :: Int -> SourceSecurityGroup -> Int
hashWithSalt Int
_salt SourceSecurityGroup' {Maybe Text
ownerAlias :: Maybe Text
groupName :: Maybe Text
$sel:ownerAlias:SourceSecurityGroup' :: SourceSecurityGroup -> Maybe Text
$sel:groupName:SourceSecurityGroup' :: SourceSecurityGroup -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerAlias
instance Prelude.NFData SourceSecurityGroup where
rnf :: SourceSecurityGroup -> ()
rnf SourceSecurityGroup' {Maybe Text
ownerAlias :: Maybe Text
groupName :: Maybe Text
$sel:ownerAlias:SourceSecurityGroup' :: SourceSecurityGroup -> Maybe Text
$sel:groupName:SourceSecurityGroup' :: SourceSecurityGroup -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerAlias