{-# 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.CloudFrontOriginAccessIdentitySummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudFrontOriginAccessIdentitySummary = CloudFrontOriginAccessIdentitySummary'
{
CloudFrontOriginAccessIdentitySummary -> Text
id :: Prelude.Text,
CloudFrontOriginAccessIdentitySummary -> Text
s3CanonicalUserId :: Prelude.Text,
:: Prelude.Text
}
deriving (CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool
(CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool)
-> (CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool)
-> Eq CloudFrontOriginAccessIdentitySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool
$c/= :: CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool
== :: CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool
$c== :: CloudFrontOriginAccessIdentitySummary
-> CloudFrontOriginAccessIdentitySummary -> Bool
Prelude.Eq, ReadPrec [CloudFrontOriginAccessIdentitySummary]
ReadPrec CloudFrontOriginAccessIdentitySummary
Int -> ReadS CloudFrontOriginAccessIdentitySummary
ReadS [CloudFrontOriginAccessIdentitySummary]
(Int -> ReadS CloudFrontOriginAccessIdentitySummary)
-> ReadS [CloudFrontOriginAccessIdentitySummary]
-> ReadPrec CloudFrontOriginAccessIdentitySummary
-> ReadPrec [CloudFrontOriginAccessIdentitySummary]
-> Read CloudFrontOriginAccessIdentitySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudFrontOriginAccessIdentitySummary]
$creadListPrec :: ReadPrec [CloudFrontOriginAccessIdentitySummary]
readPrec :: ReadPrec CloudFrontOriginAccessIdentitySummary
$creadPrec :: ReadPrec CloudFrontOriginAccessIdentitySummary
readList :: ReadS [CloudFrontOriginAccessIdentitySummary]
$creadList :: ReadS [CloudFrontOriginAccessIdentitySummary]
readsPrec :: Int -> ReadS CloudFrontOriginAccessIdentitySummary
$creadsPrec :: Int -> ReadS CloudFrontOriginAccessIdentitySummary
Prelude.Read, Int -> CloudFrontOriginAccessIdentitySummary -> ShowS
[CloudFrontOriginAccessIdentitySummary] -> ShowS
CloudFrontOriginAccessIdentitySummary -> String
(Int -> CloudFrontOriginAccessIdentitySummary -> ShowS)
-> (CloudFrontOriginAccessIdentitySummary -> String)
-> ([CloudFrontOriginAccessIdentitySummary] -> ShowS)
-> Show CloudFrontOriginAccessIdentitySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudFrontOriginAccessIdentitySummary] -> ShowS
$cshowList :: [CloudFrontOriginAccessIdentitySummary] -> ShowS
show :: CloudFrontOriginAccessIdentitySummary -> String
$cshow :: CloudFrontOriginAccessIdentitySummary -> String
showsPrec :: Int -> CloudFrontOriginAccessIdentitySummary -> ShowS
$cshowsPrec :: Int -> CloudFrontOriginAccessIdentitySummary -> ShowS
Prelude.Show, (forall x.
CloudFrontOriginAccessIdentitySummary
-> Rep CloudFrontOriginAccessIdentitySummary x)
-> (forall x.
Rep CloudFrontOriginAccessIdentitySummary x
-> CloudFrontOriginAccessIdentitySummary)
-> Generic CloudFrontOriginAccessIdentitySummary
forall x.
Rep CloudFrontOriginAccessIdentitySummary x
-> CloudFrontOriginAccessIdentitySummary
forall x.
CloudFrontOriginAccessIdentitySummary
-> Rep CloudFrontOriginAccessIdentitySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudFrontOriginAccessIdentitySummary x
-> CloudFrontOriginAccessIdentitySummary
$cfrom :: forall x.
CloudFrontOriginAccessIdentitySummary
-> Rep CloudFrontOriginAccessIdentitySummary x
Prelude.Generic)
newCloudFrontOriginAccessIdentitySummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CloudFrontOriginAccessIdentitySummary
newCloudFrontOriginAccessIdentitySummary :: Text -> Text -> Text -> CloudFrontOriginAccessIdentitySummary
newCloudFrontOriginAccessIdentitySummary
Text
pId_
Text
pS3CanonicalUserId_
Text
pComment_ =
CloudFrontOriginAccessIdentitySummary' :: Text -> Text -> Text -> CloudFrontOriginAccessIdentitySummary
CloudFrontOriginAccessIdentitySummary'
{ $sel:id:CloudFrontOriginAccessIdentitySummary' :: Text
id = Text
pId_,
$sel:s3CanonicalUserId:CloudFrontOriginAccessIdentitySummary' :: Text
s3CanonicalUserId =
Text
pS3CanonicalUserId_,
$sel:comment:CloudFrontOriginAccessIdentitySummary' :: Text
comment = Text
pComment_
}
cloudFrontOriginAccessIdentitySummary_id :: Lens.Lens' CloudFrontOriginAccessIdentitySummary Prelude.Text
cloudFrontOriginAccessIdentitySummary_id :: (Text -> f Text)
-> CloudFrontOriginAccessIdentitySummary
-> f CloudFrontOriginAccessIdentitySummary
cloudFrontOriginAccessIdentitySummary_id = (CloudFrontOriginAccessIdentitySummary -> Text)
-> (CloudFrontOriginAccessIdentitySummary
-> Text -> CloudFrontOriginAccessIdentitySummary)
-> Lens
CloudFrontOriginAccessIdentitySummary
CloudFrontOriginAccessIdentitySummary
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentitySummary' {Text
id :: Text
$sel:id:CloudFrontOriginAccessIdentitySummary' :: CloudFrontOriginAccessIdentitySummary -> Text
id} -> Text
id) (\s :: CloudFrontOriginAccessIdentitySummary
s@CloudFrontOriginAccessIdentitySummary' {} Text
a -> CloudFrontOriginAccessIdentitySummary
s {$sel:id:CloudFrontOriginAccessIdentitySummary' :: Text
id = Text
a} :: CloudFrontOriginAccessIdentitySummary)
cloudFrontOriginAccessIdentitySummary_s3CanonicalUserId :: Lens.Lens' CloudFrontOriginAccessIdentitySummary Prelude.Text
cloudFrontOriginAccessIdentitySummary_s3CanonicalUserId :: (Text -> f Text)
-> CloudFrontOriginAccessIdentitySummary
-> f CloudFrontOriginAccessIdentitySummary
cloudFrontOriginAccessIdentitySummary_s3CanonicalUserId = (CloudFrontOriginAccessIdentitySummary -> Text)
-> (CloudFrontOriginAccessIdentitySummary
-> Text -> CloudFrontOriginAccessIdentitySummary)
-> Lens
CloudFrontOriginAccessIdentitySummary
CloudFrontOriginAccessIdentitySummary
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentitySummary' {Text
s3CanonicalUserId :: Text
$sel:s3CanonicalUserId:CloudFrontOriginAccessIdentitySummary' :: CloudFrontOriginAccessIdentitySummary -> Text
s3CanonicalUserId} -> Text
s3CanonicalUserId) (\s :: CloudFrontOriginAccessIdentitySummary
s@CloudFrontOriginAccessIdentitySummary' {} Text
a -> CloudFrontOriginAccessIdentitySummary
s {$sel:s3CanonicalUserId:CloudFrontOriginAccessIdentitySummary' :: Text
s3CanonicalUserId = Text
a} :: CloudFrontOriginAccessIdentitySummary)
cloudFrontOriginAccessIdentitySummary_comment :: Lens.Lens' CloudFrontOriginAccessIdentitySummary Prelude.Text
= (CloudFrontOriginAccessIdentitySummary -> Text)
-> (CloudFrontOriginAccessIdentitySummary
-> Text -> CloudFrontOriginAccessIdentitySummary)
-> Lens
CloudFrontOriginAccessIdentitySummary
CloudFrontOriginAccessIdentitySummary
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudFrontOriginAccessIdentitySummary' {Text
comment :: Text
$sel:comment:CloudFrontOriginAccessIdentitySummary' :: CloudFrontOriginAccessIdentitySummary -> Text
comment} -> Text
comment) (\s :: CloudFrontOriginAccessIdentitySummary
s@CloudFrontOriginAccessIdentitySummary' {} Text
a -> CloudFrontOriginAccessIdentitySummary
s {$sel:comment:CloudFrontOriginAccessIdentitySummary' :: Text
comment = Text
a} :: CloudFrontOriginAccessIdentitySummary)
instance
Core.FromXML
CloudFrontOriginAccessIdentitySummary
where
parseXML :: [Node] -> Either String CloudFrontOriginAccessIdentitySummary
parseXML [Node]
x =
Text -> Text -> Text -> CloudFrontOriginAccessIdentitySummary
CloudFrontOriginAccessIdentitySummary'
(Text -> Text -> Text -> CloudFrontOriginAccessIdentitySummary)
-> Either String Text
-> Either
String (Text -> Text -> CloudFrontOriginAccessIdentitySummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Id")
Either
String (Text -> Text -> CloudFrontOriginAccessIdentitySummary)
-> Either String Text
-> Either String (Text -> CloudFrontOriginAccessIdentitySummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"S3CanonicalUserId")
Either String (Text -> CloudFrontOriginAccessIdentitySummary)
-> Either String Text
-> Either String CloudFrontOriginAccessIdentitySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Comment")
instance
Prelude.Hashable
CloudFrontOriginAccessIdentitySummary
instance
Prelude.NFData
CloudFrontOriginAccessIdentitySummary