{-# 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.EC2.Types.UserIdGroupPair where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data UserIdGroupPair = UserIdGroupPair'
{
UserIdGroupPair -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UserIdGroupPair -> Maybe Text
groupId :: Prelude.Maybe Prelude.Text,
UserIdGroupPair -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
UserIdGroupPair -> Maybe Text
peeringStatus :: Prelude.Maybe Prelude.Text,
UserIdGroupPair -> Maybe Text
userId :: Prelude.Maybe Prelude.Text,
UserIdGroupPair -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
UserIdGroupPair -> Maybe Text
vpcPeeringConnectionId :: Prelude.Maybe Prelude.Text
}
deriving (UserIdGroupPair -> UserIdGroupPair -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserIdGroupPair -> UserIdGroupPair -> Bool
$c/= :: UserIdGroupPair -> UserIdGroupPair -> Bool
== :: UserIdGroupPair -> UserIdGroupPair -> Bool
$c== :: UserIdGroupPair -> UserIdGroupPair -> Bool
Prelude.Eq, ReadPrec [UserIdGroupPair]
ReadPrec UserIdGroupPair
Int -> ReadS UserIdGroupPair
ReadS [UserIdGroupPair]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserIdGroupPair]
$creadListPrec :: ReadPrec [UserIdGroupPair]
readPrec :: ReadPrec UserIdGroupPair
$creadPrec :: ReadPrec UserIdGroupPair
readList :: ReadS [UserIdGroupPair]
$creadList :: ReadS [UserIdGroupPair]
readsPrec :: Int -> ReadS UserIdGroupPair
$creadsPrec :: Int -> ReadS UserIdGroupPair
Prelude.Read, Int -> UserIdGroupPair -> ShowS
[UserIdGroupPair] -> ShowS
UserIdGroupPair -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserIdGroupPair] -> ShowS
$cshowList :: [UserIdGroupPair] -> ShowS
show :: UserIdGroupPair -> String
$cshow :: UserIdGroupPair -> String
showsPrec :: Int -> UserIdGroupPair -> ShowS
$cshowsPrec :: Int -> UserIdGroupPair -> ShowS
Prelude.Show, forall x. Rep UserIdGroupPair x -> UserIdGroupPair
forall x. UserIdGroupPair -> Rep UserIdGroupPair x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UserIdGroupPair x -> UserIdGroupPair
$cfrom :: forall x. UserIdGroupPair -> Rep UserIdGroupPair x
Prelude.Generic)
newUserIdGroupPair ::
UserIdGroupPair
newUserIdGroupPair :: UserIdGroupPair
newUserIdGroupPair =
UserIdGroupPair'
{ $sel:description:UserIdGroupPair' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:groupId:UserIdGroupPair' :: Maybe Text
groupId = forall a. Maybe a
Prelude.Nothing,
$sel:groupName:UserIdGroupPair' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
$sel:peeringStatus:UserIdGroupPair' :: Maybe Text
peeringStatus = forall a. Maybe a
Prelude.Nothing,
$sel:userId:UserIdGroupPair' :: Maybe Text
userId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:UserIdGroupPair' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing,
$sel:vpcPeeringConnectionId:UserIdGroupPair' :: Maybe Text
vpcPeeringConnectionId = forall a. Maybe a
Prelude.Nothing
}
userIdGroupPair_description :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_description :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
description :: Maybe Text
$sel:description:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
description} -> Maybe Text
description) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:description:UserIdGroupPair' :: Maybe Text
description = Maybe Text
a} :: UserIdGroupPair)
userIdGroupPair_groupId :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_groupId :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_groupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
groupId :: Maybe Text
$sel:groupId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
groupId} -> Maybe Text
groupId) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:groupId:UserIdGroupPair' :: Maybe Text
groupId = Maybe Text
a} :: UserIdGroupPair)
userIdGroupPair_groupName :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_groupName :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
groupName :: Maybe Text
$sel:groupName:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:groupName:UserIdGroupPair' :: Maybe Text
groupName = Maybe Text
a} :: UserIdGroupPair)
userIdGroupPair_peeringStatus :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_peeringStatus :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_peeringStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
peeringStatus :: Maybe Text
$sel:peeringStatus:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
peeringStatus} -> Maybe Text
peeringStatus) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:peeringStatus:UserIdGroupPair' :: Maybe Text
peeringStatus = Maybe Text
a} :: UserIdGroupPair)
userIdGroupPair_userId :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_userId :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_userId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
userId :: Maybe Text
$sel:userId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
userId} -> Maybe Text
userId) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:userId:UserIdGroupPair' :: Maybe Text
userId = Maybe Text
a} :: UserIdGroupPair)
userIdGroupPair_vpcId :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_vpcId :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:vpcId:UserIdGroupPair' :: Maybe Text
vpcId = Maybe Text
a} :: UserIdGroupPair)
userIdGroupPair_vpcPeeringConnectionId :: Lens.Lens' UserIdGroupPair (Prelude.Maybe Prelude.Text)
userIdGroupPair_vpcPeeringConnectionId :: Lens' UserIdGroupPair (Maybe Text)
userIdGroupPair_vpcPeeringConnectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserIdGroupPair' {Maybe Text
vpcPeeringConnectionId :: Maybe Text
$sel:vpcPeeringConnectionId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
vpcPeeringConnectionId} -> Maybe Text
vpcPeeringConnectionId) (\s :: UserIdGroupPair
s@UserIdGroupPair' {} Maybe Text
a -> UserIdGroupPair
s {$sel:vpcPeeringConnectionId:UserIdGroupPair' :: Maybe Text
vpcPeeringConnectionId = Maybe Text
a} :: UserIdGroupPair)
instance Data.FromXML UserIdGroupPair where
parseXML :: [Node] -> Either String UserIdGroupPair
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> UserIdGroupPair
UserIdGroupPair'
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
"description")
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
"groupId")
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
"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
"peeringStatus")
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
"userId")
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
"vpcId")
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
"vpcPeeringConnectionId")
instance Prelude.Hashable UserIdGroupPair where
hashWithSalt :: Int -> UserIdGroupPair -> Int
hashWithSalt Int
_salt UserIdGroupPair' {Maybe Text
vpcPeeringConnectionId :: Maybe Text
vpcId :: Maybe Text
userId :: Maybe Text
peeringStatus :: Maybe Text
groupName :: Maybe Text
groupId :: Maybe Text
description :: Maybe Text
$sel:vpcPeeringConnectionId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:vpcId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:userId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:peeringStatus:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:groupName:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:groupId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:description:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peeringStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcPeeringConnectionId
instance Prelude.NFData UserIdGroupPair where
rnf :: UserIdGroupPair -> ()
rnf UserIdGroupPair' {Maybe Text
vpcPeeringConnectionId :: Maybe Text
vpcId :: Maybe Text
userId :: Maybe Text
peeringStatus :: Maybe Text
groupName :: Maybe Text
groupId :: Maybe Text
description :: Maybe Text
$sel:vpcPeeringConnectionId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:vpcId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:userId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:peeringStatus:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:groupName:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:groupId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:description:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupId
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
peeringStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcPeeringConnectionId
instance Data.ToQuery UserIdGroupPair where
toQuery :: UserIdGroupPair -> QueryString
toQuery UserIdGroupPair' {Maybe Text
vpcPeeringConnectionId :: Maybe Text
vpcId :: Maybe Text
userId :: Maybe Text
peeringStatus :: Maybe Text
groupName :: Maybe Text
groupId :: Maybe Text
description :: Maybe Text
$sel:vpcPeeringConnectionId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:vpcId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:userId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:peeringStatus:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:groupName:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:groupId:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
$sel:description:UserIdGroupPair' :: UserIdGroupPair -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description,
ByteString
"GroupId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupId,
ByteString
"GroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupName,
ByteString
"PeeringStatus" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
peeringStatus,
ByteString
"UserId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
userId,
ByteString
"VpcId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
vpcId,
ByteString
"VpcPeeringConnectionId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
vpcPeeringConnectionId
]