{-# 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.CloudFront.Types.KGKeyPairIds where
import Amazonka.CloudFront.Types.KeyPairIds
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data KGKeyPairIds = KGKeyPairIds'
{ KGKeyPairIds -> Maybe KeyPairIds
keyPairIds :: Prelude.Maybe KeyPairIds,
KGKeyPairIds -> Maybe Text
keyGroupId :: Prelude.Maybe Prelude.Text
}
deriving (KGKeyPairIds -> KGKeyPairIds -> Bool
(KGKeyPairIds -> KGKeyPairIds -> Bool)
-> (KGKeyPairIds -> KGKeyPairIds -> Bool) -> Eq KGKeyPairIds
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KGKeyPairIds -> KGKeyPairIds -> Bool
$c/= :: KGKeyPairIds -> KGKeyPairIds -> Bool
== :: KGKeyPairIds -> KGKeyPairIds -> Bool
$c== :: KGKeyPairIds -> KGKeyPairIds -> Bool
Prelude.Eq, ReadPrec [KGKeyPairIds]
ReadPrec KGKeyPairIds
Int -> ReadS KGKeyPairIds
ReadS [KGKeyPairIds]
(Int -> ReadS KGKeyPairIds)
-> ReadS [KGKeyPairIds]
-> ReadPrec KGKeyPairIds
-> ReadPrec [KGKeyPairIds]
-> Read KGKeyPairIds
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KGKeyPairIds]
$creadListPrec :: ReadPrec [KGKeyPairIds]
readPrec :: ReadPrec KGKeyPairIds
$creadPrec :: ReadPrec KGKeyPairIds
readList :: ReadS [KGKeyPairIds]
$creadList :: ReadS [KGKeyPairIds]
readsPrec :: Int -> ReadS KGKeyPairIds
$creadsPrec :: Int -> ReadS KGKeyPairIds
Prelude.Read, Int -> KGKeyPairIds -> ShowS
[KGKeyPairIds] -> ShowS
KGKeyPairIds -> String
(Int -> KGKeyPairIds -> ShowS)
-> (KGKeyPairIds -> String)
-> ([KGKeyPairIds] -> ShowS)
-> Show KGKeyPairIds
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KGKeyPairIds] -> ShowS
$cshowList :: [KGKeyPairIds] -> ShowS
show :: KGKeyPairIds -> String
$cshow :: KGKeyPairIds -> String
showsPrec :: Int -> KGKeyPairIds -> ShowS
$cshowsPrec :: Int -> KGKeyPairIds -> ShowS
Prelude.Show, (forall x. KGKeyPairIds -> Rep KGKeyPairIds x)
-> (forall x. Rep KGKeyPairIds x -> KGKeyPairIds)
-> Generic KGKeyPairIds
forall x. Rep KGKeyPairIds x -> KGKeyPairIds
forall x. KGKeyPairIds -> Rep KGKeyPairIds x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KGKeyPairIds x -> KGKeyPairIds
$cfrom :: forall x. KGKeyPairIds -> Rep KGKeyPairIds x
Prelude.Generic)
newKGKeyPairIds ::
KGKeyPairIds
newKGKeyPairIds :: KGKeyPairIds
newKGKeyPairIds =
KGKeyPairIds' :: Maybe KeyPairIds -> Maybe Text -> KGKeyPairIds
KGKeyPairIds'
{ $sel:keyPairIds:KGKeyPairIds' :: Maybe KeyPairIds
keyPairIds = Maybe KeyPairIds
forall a. Maybe a
Prelude.Nothing,
$sel:keyGroupId:KGKeyPairIds' :: Maybe Text
keyGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
kGKeyPairIds_keyPairIds :: Lens.Lens' KGKeyPairIds (Prelude.Maybe KeyPairIds)
kGKeyPairIds_keyPairIds :: (Maybe KeyPairIds -> f (Maybe KeyPairIds))
-> KGKeyPairIds -> f KGKeyPairIds
kGKeyPairIds_keyPairIds = (KGKeyPairIds -> Maybe KeyPairIds)
-> (KGKeyPairIds -> Maybe KeyPairIds -> KGKeyPairIds)
-> Lens
KGKeyPairIds KGKeyPairIds (Maybe KeyPairIds) (Maybe KeyPairIds)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KGKeyPairIds' {Maybe KeyPairIds
keyPairIds :: Maybe KeyPairIds
$sel:keyPairIds:KGKeyPairIds' :: KGKeyPairIds -> Maybe KeyPairIds
keyPairIds} -> Maybe KeyPairIds
keyPairIds) (\s :: KGKeyPairIds
s@KGKeyPairIds' {} Maybe KeyPairIds
a -> KGKeyPairIds
s {$sel:keyPairIds:KGKeyPairIds' :: Maybe KeyPairIds
keyPairIds = Maybe KeyPairIds
a} :: KGKeyPairIds)
kGKeyPairIds_keyGroupId :: Lens.Lens' KGKeyPairIds (Prelude.Maybe Prelude.Text)
kGKeyPairIds_keyGroupId :: (Maybe Text -> f (Maybe Text)) -> KGKeyPairIds -> f KGKeyPairIds
kGKeyPairIds_keyGroupId = (KGKeyPairIds -> Maybe Text)
-> (KGKeyPairIds -> Maybe Text -> KGKeyPairIds)
-> Lens KGKeyPairIds KGKeyPairIds (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KGKeyPairIds' {Maybe Text
keyGroupId :: Maybe Text
$sel:keyGroupId:KGKeyPairIds' :: KGKeyPairIds -> Maybe Text
keyGroupId} -> Maybe Text
keyGroupId) (\s :: KGKeyPairIds
s@KGKeyPairIds' {} Maybe Text
a -> KGKeyPairIds
s {$sel:keyGroupId:KGKeyPairIds' :: Maybe Text
keyGroupId = Maybe Text
a} :: KGKeyPairIds)
instance Core.FromXML KGKeyPairIds where
parseXML :: [Node] -> Either String KGKeyPairIds
parseXML [Node]
x =
Maybe KeyPairIds -> Maybe Text -> KGKeyPairIds
KGKeyPairIds'
(Maybe KeyPairIds -> Maybe Text -> KGKeyPairIds)
-> Either String (Maybe KeyPairIds)
-> Either String (Maybe Text -> KGKeyPairIds)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe KeyPairIds)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KeyPairIds")
Either String (Maybe Text -> KGKeyPairIds)
-> Either String (Maybe Text) -> Either String KGKeyPairIds
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KeyGroupId")
instance Prelude.Hashable KGKeyPairIds
instance Prelude.NFData KGKeyPairIds