{-# 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.FieldLevelEncryptionProfileSummary where
import Amazonka.CloudFront.Types.EncryptionEntities
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FieldLevelEncryptionProfileSummary = FieldLevelEncryptionProfileSummary'
{
:: Prelude.Maybe Prelude.Text,
FieldLevelEncryptionProfileSummary -> Text
id :: Prelude.Text,
FieldLevelEncryptionProfileSummary -> ISO8601
lastModifiedTime :: Core.ISO8601,
FieldLevelEncryptionProfileSummary -> Text
name :: Prelude.Text,
FieldLevelEncryptionProfileSummary -> EncryptionEntities
encryptionEntities :: EncryptionEntities
}
deriving (FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool
(FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool)
-> (FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool)
-> Eq FieldLevelEncryptionProfileSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool
$c/= :: FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool
== :: FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool
$c== :: FieldLevelEncryptionProfileSummary
-> FieldLevelEncryptionProfileSummary -> Bool
Prelude.Eq, ReadPrec [FieldLevelEncryptionProfileSummary]
ReadPrec FieldLevelEncryptionProfileSummary
Int -> ReadS FieldLevelEncryptionProfileSummary
ReadS [FieldLevelEncryptionProfileSummary]
(Int -> ReadS FieldLevelEncryptionProfileSummary)
-> ReadS [FieldLevelEncryptionProfileSummary]
-> ReadPrec FieldLevelEncryptionProfileSummary
-> ReadPrec [FieldLevelEncryptionProfileSummary]
-> Read FieldLevelEncryptionProfileSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FieldLevelEncryptionProfileSummary]
$creadListPrec :: ReadPrec [FieldLevelEncryptionProfileSummary]
readPrec :: ReadPrec FieldLevelEncryptionProfileSummary
$creadPrec :: ReadPrec FieldLevelEncryptionProfileSummary
readList :: ReadS [FieldLevelEncryptionProfileSummary]
$creadList :: ReadS [FieldLevelEncryptionProfileSummary]
readsPrec :: Int -> ReadS FieldLevelEncryptionProfileSummary
$creadsPrec :: Int -> ReadS FieldLevelEncryptionProfileSummary
Prelude.Read, Int -> FieldLevelEncryptionProfileSummary -> ShowS
[FieldLevelEncryptionProfileSummary] -> ShowS
FieldLevelEncryptionProfileSummary -> String
(Int -> FieldLevelEncryptionProfileSummary -> ShowS)
-> (FieldLevelEncryptionProfileSummary -> String)
-> ([FieldLevelEncryptionProfileSummary] -> ShowS)
-> Show FieldLevelEncryptionProfileSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FieldLevelEncryptionProfileSummary] -> ShowS
$cshowList :: [FieldLevelEncryptionProfileSummary] -> ShowS
show :: FieldLevelEncryptionProfileSummary -> String
$cshow :: FieldLevelEncryptionProfileSummary -> String
showsPrec :: Int -> FieldLevelEncryptionProfileSummary -> ShowS
$cshowsPrec :: Int -> FieldLevelEncryptionProfileSummary -> ShowS
Prelude.Show, (forall x.
FieldLevelEncryptionProfileSummary
-> Rep FieldLevelEncryptionProfileSummary x)
-> (forall x.
Rep FieldLevelEncryptionProfileSummary x
-> FieldLevelEncryptionProfileSummary)
-> Generic FieldLevelEncryptionProfileSummary
forall x.
Rep FieldLevelEncryptionProfileSummary x
-> FieldLevelEncryptionProfileSummary
forall x.
FieldLevelEncryptionProfileSummary
-> Rep FieldLevelEncryptionProfileSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FieldLevelEncryptionProfileSummary x
-> FieldLevelEncryptionProfileSummary
$cfrom :: forall x.
FieldLevelEncryptionProfileSummary
-> Rep FieldLevelEncryptionProfileSummary x
Prelude.Generic)
newFieldLevelEncryptionProfileSummary ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
EncryptionEntities ->
FieldLevelEncryptionProfileSummary
newFieldLevelEncryptionProfileSummary :: Text
-> UTCTime
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary
newFieldLevelEncryptionProfileSummary
Text
pId_
UTCTime
pLastModifiedTime_
Text
pName_
EncryptionEntities
pEncryptionEntities_ =
FieldLevelEncryptionProfileSummary' :: Maybe Text
-> Text
-> ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary'
{ $sel:comment:FieldLevelEncryptionProfileSummary' :: Maybe Text
comment =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:FieldLevelEncryptionProfileSummary' :: Text
id = Text
pId_,
$sel:lastModifiedTime:FieldLevelEncryptionProfileSummary' :: ISO8601
lastModifiedTime =
Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_,
$sel:name:FieldLevelEncryptionProfileSummary' :: Text
name = Text
pName_,
$sel:encryptionEntities:FieldLevelEncryptionProfileSummary' :: EncryptionEntities
encryptionEntities =
EncryptionEntities
pEncryptionEntities_
}
fieldLevelEncryptionProfileSummary_comment :: Lens.Lens' FieldLevelEncryptionProfileSummary (Prelude.Maybe Prelude.Text)
= (FieldLevelEncryptionProfileSummary -> Maybe Text)
-> (FieldLevelEncryptionProfileSummary
-> Maybe Text -> FieldLevelEncryptionProfileSummary)
-> Lens
FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileSummary' {Maybe Text
comment :: Maybe Text
$sel:comment:FieldLevelEncryptionProfileSummary' :: FieldLevelEncryptionProfileSummary -> Maybe Text
comment} -> Maybe Text
comment) (\s :: FieldLevelEncryptionProfileSummary
s@FieldLevelEncryptionProfileSummary' {} Maybe Text
a -> FieldLevelEncryptionProfileSummary
s {$sel:comment:FieldLevelEncryptionProfileSummary' :: Maybe Text
comment = Maybe Text
a} :: FieldLevelEncryptionProfileSummary)
fieldLevelEncryptionProfileSummary_id :: Lens.Lens' FieldLevelEncryptionProfileSummary Prelude.Text
fieldLevelEncryptionProfileSummary_id :: (Text -> f Text)
-> FieldLevelEncryptionProfileSummary
-> f FieldLevelEncryptionProfileSummary
fieldLevelEncryptionProfileSummary_id = (FieldLevelEncryptionProfileSummary -> Text)
-> (FieldLevelEncryptionProfileSummary
-> Text -> FieldLevelEncryptionProfileSummary)
-> Lens
FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileSummary' {Text
id :: Text
$sel:id:FieldLevelEncryptionProfileSummary' :: FieldLevelEncryptionProfileSummary -> Text
id} -> Text
id) (\s :: FieldLevelEncryptionProfileSummary
s@FieldLevelEncryptionProfileSummary' {} Text
a -> FieldLevelEncryptionProfileSummary
s {$sel:id:FieldLevelEncryptionProfileSummary' :: Text
id = Text
a} :: FieldLevelEncryptionProfileSummary)
fieldLevelEncryptionProfileSummary_lastModifiedTime :: Lens.Lens' FieldLevelEncryptionProfileSummary Prelude.UTCTime
fieldLevelEncryptionProfileSummary_lastModifiedTime :: (UTCTime -> f UTCTime)
-> FieldLevelEncryptionProfileSummary
-> f FieldLevelEncryptionProfileSummary
fieldLevelEncryptionProfileSummary_lastModifiedTime = (FieldLevelEncryptionProfileSummary -> ISO8601)
-> (FieldLevelEncryptionProfileSummary
-> ISO8601 -> FieldLevelEncryptionProfileSummary)
-> Lens
FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary
ISO8601
ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileSummary' {ISO8601
lastModifiedTime :: ISO8601
$sel:lastModifiedTime:FieldLevelEncryptionProfileSummary' :: FieldLevelEncryptionProfileSummary -> ISO8601
lastModifiedTime} -> ISO8601
lastModifiedTime) (\s :: FieldLevelEncryptionProfileSummary
s@FieldLevelEncryptionProfileSummary' {} ISO8601
a -> FieldLevelEncryptionProfileSummary
s {$sel:lastModifiedTime:FieldLevelEncryptionProfileSummary' :: ISO8601
lastModifiedTime = ISO8601
a} :: FieldLevelEncryptionProfileSummary) ((ISO8601 -> f ISO8601)
-> FieldLevelEncryptionProfileSummary
-> f FieldLevelEncryptionProfileSummary)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> FieldLevelEncryptionProfileSummary
-> f FieldLevelEncryptionProfileSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
fieldLevelEncryptionProfileSummary_name :: Lens.Lens' FieldLevelEncryptionProfileSummary Prelude.Text
fieldLevelEncryptionProfileSummary_name :: (Text -> f Text)
-> FieldLevelEncryptionProfileSummary
-> f FieldLevelEncryptionProfileSummary
fieldLevelEncryptionProfileSummary_name = (FieldLevelEncryptionProfileSummary -> Text)
-> (FieldLevelEncryptionProfileSummary
-> Text -> FieldLevelEncryptionProfileSummary)
-> Lens
FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileSummary' {Text
name :: Text
$sel:name:FieldLevelEncryptionProfileSummary' :: FieldLevelEncryptionProfileSummary -> Text
name} -> Text
name) (\s :: FieldLevelEncryptionProfileSummary
s@FieldLevelEncryptionProfileSummary' {} Text
a -> FieldLevelEncryptionProfileSummary
s {$sel:name:FieldLevelEncryptionProfileSummary' :: Text
name = Text
a} :: FieldLevelEncryptionProfileSummary)
fieldLevelEncryptionProfileSummary_encryptionEntities :: Lens.Lens' FieldLevelEncryptionProfileSummary EncryptionEntities
fieldLevelEncryptionProfileSummary_encryptionEntities :: (EncryptionEntities -> f EncryptionEntities)
-> FieldLevelEncryptionProfileSummary
-> f FieldLevelEncryptionProfileSummary
fieldLevelEncryptionProfileSummary_encryptionEntities = (FieldLevelEncryptionProfileSummary -> EncryptionEntities)
-> (FieldLevelEncryptionProfileSummary
-> EncryptionEntities -> FieldLevelEncryptionProfileSummary)
-> Lens
FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary
EncryptionEntities
EncryptionEntities
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfileSummary' {EncryptionEntities
encryptionEntities :: EncryptionEntities
$sel:encryptionEntities:FieldLevelEncryptionProfileSummary' :: FieldLevelEncryptionProfileSummary -> EncryptionEntities
encryptionEntities} -> EncryptionEntities
encryptionEntities) (\s :: FieldLevelEncryptionProfileSummary
s@FieldLevelEncryptionProfileSummary' {} EncryptionEntities
a -> FieldLevelEncryptionProfileSummary
s {$sel:encryptionEntities:FieldLevelEncryptionProfileSummary' :: EncryptionEntities
encryptionEntities = EncryptionEntities
a} :: FieldLevelEncryptionProfileSummary)
instance
Core.FromXML
FieldLevelEncryptionProfileSummary
where
parseXML :: [Node] -> Either String FieldLevelEncryptionProfileSummary
parseXML [Node]
x =
Maybe Text
-> Text
-> ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary
FieldLevelEncryptionProfileSummary'
(Maybe Text
-> Text
-> ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary)
-> Either String (Maybe Text)
-> Either
String
(Text
-> ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary)
forall (f :: * -> *) a b. Functor 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
"Comment")
Either
String
(Text
-> ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary)
-> Either String Text
-> Either
String
(ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary)
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
"Id")
Either
String
(ISO8601
-> Text
-> EncryptionEntities
-> FieldLevelEncryptionProfileSummary)
-> Either String ISO8601
-> Either
String
(Text -> EncryptionEntities -> FieldLevelEncryptionProfileSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"LastModifiedTime")
Either
String
(Text -> EncryptionEntities -> FieldLevelEncryptionProfileSummary)
-> Either String Text
-> Either
String (EncryptionEntities -> FieldLevelEncryptionProfileSummary)
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
"Name")
Either
String (EncryptionEntities -> FieldLevelEncryptionProfileSummary)
-> Either String EncryptionEntities
-> Either String FieldLevelEncryptionProfileSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String EncryptionEntities
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"EncryptionEntities")
instance
Prelude.Hashable
FieldLevelEncryptionProfileSummary
instance
Prelude.NFData
FieldLevelEncryptionProfileSummary