{-# 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.NetworkFirewall.Types.PerObjectStatus where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkFirewall.Types.PerObjectSyncStatus
import qualified Amazonka.Prelude as Prelude
data PerObjectStatus = PerObjectStatus'
{
PerObjectStatus -> Maybe PerObjectSyncStatus
syncStatus :: Prelude.Maybe PerObjectSyncStatus,
PerObjectStatus -> Maybe Text
updateToken :: Prelude.Maybe Prelude.Text
}
deriving (PerObjectStatus -> PerObjectStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerObjectStatus -> PerObjectStatus -> Bool
$c/= :: PerObjectStatus -> PerObjectStatus -> Bool
== :: PerObjectStatus -> PerObjectStatus -> Bool
$c== :: PerObjectStatus -> PerObjectStatus -> Bool
Prelude.Eq, ReadPrec [PerObjectStatus]
ReadPrec PerObjectStatus
Int -> ReadS PerObjectStatus
ReadS [PerObjectStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PerObjectStatus]
$creadListPrec :: ReadPrec [PerObjectStatus]
readPrec :: ReadPrec PerObjectStatus
$creadPrec :: ReadPrec PerObjectStatus
readList :: ReadS [PerObjectStatus]
$creadList :: ReadS [PerObjectStatus]
readsPrec :: Int -> ReadS PerObjectStatus
$creadsPrec :: Int -> ReadS PerObjectStatus
Prelude.Read, Int -> PerObjectStatus -> ShowS
[PerObjectStatus] -> ShowS
PerObjectStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PerObjectStatus] -> ShowS
$cshowList :: [PerObjectStatus] -> ShowS
show :: PerObjectStatus -> String
$cshow :: PerObjectStatus -> String
showsPrec :: Int -> PerObjectStatus -> ShowS
$cshowsPrec :: Int -> PerObjectStatus -> ShowS
Prelude.Show, forall x. Rep PerObjectStatus x -> PerObjectStatus
forall x. PerObjectStatus -> Rep PerObjectStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PerObjectStatus x -> PerObjectStatus
$cfrom :: forall x. PerObjectStatus -> Rep PerObjectStatus x
Prelude.Generic)
newPerObjectStatus ::
PerObjectStatus
newPerObjectStatus :: PerObjectStatus
newPerObjectStatus =
PerObjectStatus'
{ $sel:syncStatus:PerObjectStatus' :: Maybe PerObjectSyncStatus
syncStatus = forall a. Maybe a
Prelude.Nothing,
$sel:updateToken:PerObjectStatus' :: Maybe Text
updateToken = forall a. Maybe a
Prelude.Nothing
}
perObjectStatus_syncStatus :: Lens.Lens' PerObjectStatus (Prelude.Maybe PerObjectSyncStatus)
perObjectStatus_syncStatus :: Lens' PerObjectStatus (Maybe PerObjectSyncStatus)
perObjectStatus_syncStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PerObjectStatus' {Maybe PerObjectSyncStatus
syncStatus :: Maybe PerObjectSyncStatus
$sel:syncStatus:PerObjectStatus' :: PerObjectStatus -> Maybe PerObjectSyncStatus
syncStatus} -> Maybe PerObjectSyncStatus
syncStatus) (\s :: PerObjectStatus
s@PerObjectStatus' {} Maybe PerObjectSyncStatus
a -> PerObjectStatus
s {$sel:syncStatus:PerObjectStatus' :: Maybe PerObjectSyncStatus
syncStatus = Maybe PerObjectSyncStatus
a} :: PerObjectStatus)
perObjectStatus_updateToken :: Lens.Lens' PerObjectStatus (Prelude.Maybe Prelude.Text)
perObjectStatus_updateToken :: Lens' PerObjectStatus (Maybe Text)
perObjectStatus_updateToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PerObjectStatus' {Maybe Text
updateToken :: Maybe Text
$sel:updateToken:PerObjectStatus' :: PerObjectStatus -> Maybe Text
updateToken} -> Maybe Text
updateToken) (\s :: PerObjectStatus
s@PerObjectStatus' {} Maybe Text
a -> PerObjectStatus
s {$sel:updateToken:PerObjectStatus' :: Maybe Text
updateToken = Maybe Text
a} :: PerObjectStatus)
instance Data.FromJSON PerObjectStatus where
parseJSON :: Value -> Parser PerObjectStatus
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PerObjectStatus"
( \Object
x ->
Maybe PerObjectSyncStatus -> Maybe Text -> PerObjectStatus
PerObjectStatus'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SyncStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"UpdateToken")
)
instance Prelude.Hashable PerObjectStatus where
hashWithSalt :: Int -> PerObjectStatus -> Int
hashWithSalt Int
_salt PerObjectStatus' {Maybe Text
Maybe PerObjectSyncStatus
updateToken :: Maybe Text
syncStatus :: Maybe PerObjectSyncStatus
$sel:updateToken:PerObjectStatus' :: PerObjectStatus -> Maybe Text
$sel:syncStatus:PerObjectStatus' :: PerObjectStatus -> Maybe PerObjectSyncStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PerObjectSyncStatus
syncStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
updateToken
instance Prelude.NFData PerObjectStatus where
rnf :: PerObjectStatus -> ()
rnf PerObjectStatus' {Maybe Text
Maybe PerObjectSyncStatus
updateToken :: Maybe Text
syncStatus :: Maybe PerObjectSyncStatus
$sel:updateToken:PerObjectStatus' :: PerObjectStatus -> Maybe Text
$sel:syncStatus:PerObjectStatus' :: PerObjectStatus -> Maybe PerObjectSyncStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe PerObjectSyncStatus
syncStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
updateToken