{-# 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.FieldLevelEncryptionProfile where
import Amazonka.CloudFront.Types.FieldLevelEncryptionProfileConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FieldLevelEncryptionProfile = FieldLevelEncryptionProfile'
{
FieldLevelEncryptionProfile -> Text
id :: Prelude.Text,
FieldLevelEncryptionProfile -> ISO8601
lastModifiedTime :: Core.ISO8601,
FieldLevelEncryptionProfile -> FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig :: FieldLevelEncryptionProfileConfig
}
deriving (FieldLevelEncryptionProfile -> FieldLevelEncryptionProfile -> Bool
(FieldLevelEncryptionProfile
-> FieldLevelEncryptionProfile -> Bool)
-> (FieldLevelEncryptionProfile
-> FieldLevelEncryptionProfile -> Bool)
-> Eq FieldLevelEncryptionProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FieldLevelEncryptionProfile -> FieldLevelEncryptionProfile -> Bool
$c/= :: FieldLevelEncryptionProfile -> FieldLevelEncryptionProfile -> Bool
== :: FieldLevelEncryptionProfile -> FieldLevelEncryptionProfile -> Bool
$c== :: FieldLevelEncryptionProfile -> FieldLevelEncryptionProfile -> Bool
Prelude.Eq, ReadPrec [FieldLevelEncryptionProfile]
ReadPrec FieldLevelEncryptionProfile
Int -> ReadS FieldLevelEncryptionProfile
ReadS [FieldLevelEncryptionProfile]
(Int -> ReadS FieldLevelEncryptionProfile)
-> ReadS [FieldLevelEncryptionProfile]
-> ReadPrec FieldLevelEncryptionProfile
-> ReadPrec [FieldLevelEncryptionProfile]
-> Read FieldLevelEncryptionProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FieldLevelEncryptionProfile]
$creadListPrec :: ReadPrec [FieldLevelEncryptionProfile]
readPrec :: ReadPrec FieldLevelEncryptionProfile
$creadPrec :: ReadPrec FieldLevelEncryptionProfile
readList :: ReadS [FieldLevelEncryptionProfile]
$creadList :: ReadS [FieldLevelEncryptionProfile]
readsPrec :: Int -> ReadS FieldLevelEncryptionProfile
$creadsPrec :: Int -> ReadS FieldLevelEncryptionProfile
Prelude.Read, Int -> FieldLevelEncryptionProfile -> ShowS
[FieldLevelEncryptionProfile] -> ShowS
FieldLevelEncryptionProfile -> String
(Int -> FieldLevelEncryptionProfile -> ShowS)
-> (FieldLevelEncryptionProfile -> String)
-> ([FieldLevelEncryptionProfile] -> ShowS)
-> Show FieldLevelEncryptionProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FieldLevelEncryptionProfile] -> ShowS
$cshowList :: [FieldLevelEncryptionProfile] -> ShowS
show :: FieldLevelEncryptionProfile -> String
$cshow :: FieldLevelEncryptionProfile -> String
showsPrec :: Int -> FieldLevelEncryptionProfile -> ShowS
$cshowsPrec :: Int -> FieldLevelEncryptionProfile -> ShowS
Prelude.Show, (forall x.
FieldLevelEncryptionProfile -> Rep FieldLevelEncryptionProfile x)
-> (forall x.
Rep FieldLevelEncryptionProfile x -> FieldLevelEncryptionProfile)
-> Generic FieldLevelEncryptionProfile
forall x.
Rep FieldLevelEncryptionProfile x -> FieldLevelEncryptionProfile
forall x.
FieldLevelEncryptionProfile -> Rep FieldLevelEncryptionProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FieldLevelEncryptionProfile x -> FieldLevelEncryptionProfile
$cfrom :: forall x.
FieldLevelEncryptionProfile -> Rep FieldLevelEncryptionProfile x
Prelude.Generic)
newFieldLevelEncryptionProfile ::
Prelude.Text ->
Prelude.UTCTime ->
FieldLevelEncryptionProfileConfig ->
FieldLevelEncryptionProfile
newFieldLevelEncryptionProfile :: Text
-> UTCTime
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile
newFieldLevelEncryptionProfile
Text
pId_
UTCTime
pLastModifiedTime_
FieldLevelEncryptionProfileConfig
pFieldLevelEncryptionProfileConfig_ =
FieldLevelEncryptionProfile' :: Text
-> ISO8601
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile
FieldLevelEncryptionProfile'
{ $sel:id:FieldLevelEncryptionProfile' :: Text
id = Text
pId_,
$sel:lastModifiedTime:FieldLevelEncryptionProfile' :: 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:fieldLevelEncryptionProfileConfig:FieldLevelEncryptionProfile' :: FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig =
FieldLevelEncryptionProfileConfig
pFieldLevelEncryptionProfileConfig_
}
fieldLevelEncryptionProfile_id :: Lens.Lens' FieldLevelEncryptionProfile Prelude.Text
fieldLevelEncryptionProfile_id :: (Text -> f Text)
-> FieldLevelEncryptionProfile -> f FieldLevelEncryptionProfile
fieldLevelEncryptionProfile_id = (FieldLevelEncryptionProfile -> Text)
-> (FieldLevelEncryptionProfile
-> Text -> FieldLevelEncryptionProfile)
-> Lens
FieldLevelEncryptionProfile FieldLevelEncryptionProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfile' {Text
id :: Text
$sel:id:FieldLevelEncryptionProfile' :: FieldLevelEncryptionProfile -> Text
id} -> Text
id) (\s :: FieldLevelEncryptionProfile
s@FieldLevelEncryptionProfile' {} Text
a -> FieldLevelEncryptionProfile
s {$sel:id:FieldLevelEncryptionProfile' :: Text
id = Text
a} :: FieldLevelEncryptionProfile)
fieldLevelEncryptionProfile_lastModifiedTime :: Lens.Lens' FieldLevelEncryptionProfile Prelude.UTCTime
fieldLevelEncryptionProfile_lastModifiedTime :: (UTCTime -> f UTCTime)
-> FieldLevelEncryptionProfile -> f FieldLevelEncryptionProfile
fieldLevelEncryptionProfile_lastModifiedTime = (FieldLevelEncryptionProfile -> ISO8601)
-> (FieldLevelEncryptionProfile
-> ISO8601 -> FieldLevelEncryptionProfile)
-> Lens
FieldLevelEncryptionProfile
FieldLevelEncryptionProfile
ISO8601
ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfile' {ISO8601
lastModifiedTime :: ISO8601
$sel:lastModifiedTime:FieldLevelEncryptionProfile' :: FieldLevelEncryptionProfile -> ISO8601
lastModifiedTime} -> ISO8601
lastModifiedTime) (\s :: FieldLevelEncryptionProfile
s@FieldLevelEncryptionProfile' {} ISO8601
a -> FieldLevelEncryptionProfile
s {$sel:lastModifiedTime:FieldLevelEncryptionProfile' :: ISO8601
lastModifiedTime = ISO8601
a} :: FieldLevelEncryptionProfile) ((ISO8601 -> f ISO8601)
-> FieldLevelEncryptionProfile -> f FieldLevelEncryptionProfile)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> FieldLevelEncryptionProfile
-> f FieldLevelEncryptionProfile
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
fieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig :: Lens.Lens' FieldLevelEncryptionProfile FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig :: (FieldLevelEncryptionProfileConfig
-> f FieldLevelEncryptionProfileConfig)
-> FieldLevelEncryptionProfile -> f FieldLevelEncryptionProfile
fieldLevelEncryptionProfile_fieldLevelEncryptionProfileConfig = (FieldLevelEncryptionProfile -> FieldLevelEncryptionProfileConfig)
-> (FieldLevelEncryptionProfile
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile)
-> Lens
FieldLevelEncryptionProfile
FieldLevelEncryptionProfile
FieldLevelEncryptionProfileConfig
FieldLevelEncryptionProfileConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FieldLevelEncryptionProfile' {FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig :: FieldLevelEncryptionProfileConfig
$sel:fieldLevelEncryptionProfileConfig:FieldLevelEncryptionProfile' :: FieldLevelEncryptionProfile -> FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig} -> FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig) (\s :: FieldLevelEncryptionProfile
s@FieldLevelEncryptionProfile' {} FieldLevelEncryptionProfileConfig
a -> FieldLevelEncryptionProfile
s {$sel:fieldLevelEncryptionProfileConfig:FieldLevelEncryptionProfile' :: FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig = FieldLevelEncryptionProfileConfig
a} :: FieldLevelEncryptionProfile)
instance Core.FromXML FieldLevelEncryptionProfile where
parseXML :: [Node] -> Either String FieldLevelEncryptionProfile
parseXML [Node]
x =
Text
-> ISO8601
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile
FieldLevelEncryptionProfile'
(Text
-> ISO8601
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile)
-> Either String Text
-> Either
String
(ISO8601
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile)
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
(ISO8601
-> FieldLevelEncryptionProfileConfig
-> FieldLevelEncryptionProfile)
-> Either String ISO8601
-> Either
String
(FieldLevelEncryptionProfileConfig -> FieldLevelEncryptionProfile)
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
(FieldLevelEncryptionProfileConfig -> FieldLevelEncryptionProfile)
-> Either String FieldLevelEncryptionProfileConfig
-> Either String FieldLevelEncryptionProfile
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String FieldLevelEncryptionProfileConfig
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"FieldLevelEncryptionProfileConfig")
instance Prelude.Hashable FieldLevelEncryptionProfile
instance Prelude.NFData FieldLevelEncryptionProfile