{-# 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.InvalidationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InvalidationSummary = InvalidationSummary'
{
InvalidationSummary -> Text
id :: Prelude.Text,
InvalidationSummary -> ISO8601
createTime :: Core.ISO8601,
InvalidationSummary -> Text
status :: Prelude.Text
}
deriving (InvalidationSummary -> InvalidationSummary -> Bool
(InvalidationSummary -> InvalidationSummary -> Bool)
-> (InvalidationSummary -> InvalidationSummary -> Bool)
-> Eq InvalidationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InvalidationSummary -> InvalidationSummary -> Bool
$c/= :: InvalidationSummary -> InvalidationSummary -> Bool
== :: InvalidationSummary -> InvalidationSummary -> Bool
$c== :: InvalidationSummary -> InvalidationSummary -> Bool
Prelude.Eq, ReadPrec [InvalidationSummary]
ReadPrec InvalidationSummary
Int -> ReadS InvalidationSummary
ReadS [InvalidationSummary]
(Int -> ReadS InvalidationSummary)
-> ReadS [InvalidationSummary]
-> ReadPrec InvalidationSummary
-> ReadPrec [InvalidationSummary]
-> Read InvalidationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InvalidationSummary]
$creadListPrec :: ReadPrec [InvalidationSummary]
readPrec :: ReadPrec InvalidationSummary
$creadPrec :: ReadPrec InvalidationSummary
readList :: ReadS [InvalidationSummary]
$creadList :: ReadS [InvalidationSummary]
readsPrec :: Int -> ReadS InvalidationSummary
$creadsPrec :: Int -> ReadS InvalidationSummary
Prelude.Read, Int -> InvalidationSummary -> ShowS
[InvalidationSummary] -> ShowS
InvalidationSummary -> String
(Int -> InvalidationSummary -> ShowS)
-> (InvalidationSummary -> String)
-> ([InvalidationSummary] -> ShowS)
-> Show InvalidationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InvalidationSummary] -> ShowS
$cshowList :: [InvalidationSummary] -> ShowS
show :: InvalidationSummary -> String
$cshow :: InvalidationSummary -> String
showsPrec :: Int -> InvalidationSummary -> ShowS
$cshowsPrec :: Int -> InvalidationSummary -> ShowS
Prelude.Show, (forall x. InvalidationSummary -> Rep InvalidationSummary x)
-> (forall x. Rep InvalidationSummary x -> InvalidationSummary)
-> Generic InvalidationSummary
forall x. Rep InvalidationSummary x -> InvalidationSummary
forall x. InvalidationSummary -> Rep InvalidationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InvalidationSummary x -> InvalidationSummary
$cfrom :: forall x. InvalidationSummary -> Rep InvalidationSummary x
Prelude.Generic)
newInvalidationSummary ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
InvalidationSummary
newInvalidationSummary :: Text -> UTCTime -> Text -> InvalidationSummary
newInvalidationSummary Text
pId_ UTCTime
pCreateTime_ Text
pStatus_ =
InvalidationSummary' :: Text -> ISO8601 -> Text -> InvalidationSummary
InvalidationSummary'
{ $sel:id:InvalidationSummary' :: Text
id = Text
pId_,
$sel:createTime:InvalidationSummary' :: ISO8601
createTime = 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
pCreateTime_,
$sel:status:InvalidationSummary' :: Text
status = Text
pStatus_
}
invalidationSummary_id :: Lens.Lens' InvalidationSummary Prelude.Text
invalidationSummary_id :: (Text -> f Text) -> InvalidationSummary -> f InvalidationSummary
invalidationSummary_id = (InvalidationSummary -> Text)
-> (InvalidationSummary -> Text -> InvalidationSummary)
-> Lens InvalidationSummary InvalidationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InvalidationSummary' {Text
id :: Text
$sel:id:InvalidationSummary' :: InvalidationSummary -> Text
id} -> Text
id) (\s :: InvalidationSummary
s@InvalidationSummary' {} Text
a -> InvalidationSummary
s {$sel:id:InvalidationSummary' :: Text
id = Text
a} :: InvalidationSummary)
invalidationSummary_createTime :: Lens.Lens' InvalidationSummary Prelude.UTCTime
invalidationSummary_createTime :: (UTCTime -> f UTCTime)
-> InvalidationSummary -> f InvalidationSummary
invalidationSummary_createTime = (InvalidationSummary -> ISO8601)
-> (InvalidationSummary -> ISO8601 -> InvalidationSummary)
-> Lens InvalidationSummary InvalidationSummary ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InvalidationSummary' {ISO8601
createTime :: ISO8601
$sel:createTime:InvalidationSummary' :: InvalidationSummary -> ISO8601
createTime} -> ISO8601
createTime) (\s :: InvalidationSummary
s@InvalidationSummary' {} ISO8601
a -> InvalidationSummary
s {$sel:createTime:InvalidationSummary' :: ISO8601
createTime = ISO8601
a} :: InvalidationSummary) ((ISO8601 -> f ISO8601)
-> InvalidationSummary -> f InvalidationSummary)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> InvalidationSummary
-> f InvalidationSummary
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
invalidationSummary_status :: Lens.Lens' InvalidationSummary Prelude.Text
invalidationSummary_status :: (Text -> f Text) -> InvalidationSummary -> f InvalidationSummary
invalidationSummary_status = (InvalidationSummary -> Text)
-> (InvalidationSummary -> Text -> InvalidationSummary)
-> Lens InvalidationSummary InvalidationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InvalidationSummary' {Text
status :: Text
$sel:status:InvalidationSummary' :: InvalidationSummary -> Text
status} -> Text
status) (\s :: InvalidationSummary
s@InvalidationSummary' {} Text
a -> InvalidationSummary
s {$sel:status:InvalidationSummary' :: Text
status = Text
a} :: InvalidationSummary)
instance Core.FromXML InvalidationSummary where
parseXML :: [Node] -> Either String InvalidationSummary
parseXML [Node]
x =
Text -> ISO8601 -> Text -> InvalidationSummary
InvalidationSummary'
(Text -> ISO8601 -> Text -> InvalidationSummary)
-> Either String Text
-> Either String (ISO8601 -> Text -> InvalidationSummary)
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 -> Text -> InvalidationSummary)
-> Either String ISO8601
-> Either String (Text -> InvalidationSummary)
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
"CreateTime")
Either String (Text -> InvalidationSummary)
-> Either String Text -> Either String InvalidationSummary
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
"Status")
instance Prelude.Hashable InvalidationSummary
instance Prelude.NFData InvalidationSummary