{-# 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.Route53.Types.StatusReport where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53.Internal
data StatusReport = StatusReport'
{
StatusReport -> Maybe ISO8601
checkedTime :: Prelude.Maybe Data.ISO8601,
StatusReport -> Maybe Text
status :: Prelude.Maybe Prelude.Text
}
deriving (StatusReport -> StatusReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StatusReport -> StatusReport -> Bool
$c/= :: StatusReport -> StatusReport -> Bool
== :: StatusReport -> StatusReport -> Bool
$c== :: StatusReport -> StatusReport -> Bool
Prelude.Eq, ReadPrec [StatusReport]
ReadPrec StatusReport
Int -> ReadS StatusReport
ReadS [StatusReport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StatusReport]
$creadListPrec :: ReadPrec [StatusReport]
readPrec :: ReadPrec StatusReport
$creadPrec :: ReadPrec StatusReport
readList :: ReadS [StatusReport]
$creadList :: ReadS [StatusReport]
readsPrec :: Int -> ReadS StatusReport
$creadsPrec :: Int -> ReadS StatusReport
Prelude.Read, Int -> StatusReport -> ShowS
[StatusReport] -> ShowS
StatusReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StatusReport] -> ShowS
$cshowList :: [StatusReport] -> ShowS
show :: StatusReport -> String
$cshow :: StatusReport -> String
showsPrec :: Int -> StatusReport -> ShowS
$cshowsPrec :: Int -> StatusReport -> ShowS
Prelude.Show, forall x. Rep StatusReport x -> StatusReport
forall x. StatusReport -> Rep StatusReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StatusReport x -> StatusReport
$cfrom :: forall x. StatusReport -> Rep StatusReport x
Prelude.Generic)
newStatusReport ::
StatusReport
newStatusReport :: StatusReport
newStatusReport =
StatusReport'
{ $sel:checkedTime:StatusReport' :: Maybe ISO8601
checkedTime = forall a. Maybe a
Prelude.Nothing,
$sel:status:StatusReport' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
}
statusReport_checkedTime :: Lens.Lens' StatusReport (Prelude.Maybe Prelude.UTCTime)
statusReport_checkedTime :: Lens' StatusReport (Maybe UTCTime)
statusReport_checkedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatusReport' {Maybe ISO8601
checkedTime :: Maybe ISO8601
$sel:checkedTime:StatusReport' :: StatusReport -> Maybe ISO8601
checkedTime} -> Maybe ISO8601
checkedTime) (\s :: StatusReport
s@StatusReport' {} Maybe ISO8601
a -> StatusReport
s {$sel:checkedTime:StatusReport' :: Maybe ISO8601
checkedTime = Maybe ISO8601
a} :: StatusReport) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
statusReport_status :: Lens.Lens' StatusReport (Prelude.Maybe Prelude.Text)
statusReport_status :: Lens' StatusReport (Maybe Text)
statusReport_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StatusReport' {Maybe Text
status :: Maybe Text
$sel:status:StatusReport' :: StatusReport -> Maybe Text
status} -> Maybe Text
status) (\s :: StatusReport
s@StatusReport' {} Maybe Text
a -> StatusReport
s {$sel:status:StatusReport' :: Maybe Text
status = Maybe Text
a} :: StatusReport)
instance Data.FromXML StatusReport where
parseXML :: [Node] -> Either String StatusReport
parseXML [Node]
x =
Maybe ISO8601 -> Maybe Text -> StatusReport
StatusReport'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CheckedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Status")
instance Prelude.Hashable StatusReport where
hashWithSalt :: Int -> StatusReport -> Int
hashWithSalt Int
_salt StatusReport' {Maybe Text
Maybe ISO8601
status :: Maybe Text
checkedTime :: Maybe ISO8601
$sel:status:StatusReport' :: StatusReport -> Maybe Text
$sel:checkedTime:StatusReport' :: StatusReport -> Maybe ISO8601
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
checkedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
instance Prelude.NFData StatusReport where
rnf :: StatusReport -> ()
rnf StatusReport' {Maybe Text
Maybe ISO8601
status :: Maybe Text
checkedTime :: Maybe ISO8601
$sel:status:StatusReport' :: StatusReport -> Maybe Text
$sel:checkedTime:StatusReport' :: StatusReport -> Maybe ISO8601
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
checkedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status