{-# 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.ArcZonalShift.Types.ZonalShiftSummary where
import Amazonka.ArcZonalShift.Types.ZonalShiftStatus
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
data ZonalShiftSummary = ZonalShiftSummary'
{
ZonalShiftSummary -> Text
awayFrom :: Prelude.Text,
:: Prelude.Text,
ZonalShiftSummary -> POSIX
expiryTime :: Data.POSIX,
ZonalShiftSummary -> Text
resourceIdentifier :: Prelude.Text,
ZonalShiftSummary -> POSIX
startTime :: Data.POSIX,
ZonalShiftSummary -> ZonalShiftStatus
status :: ZonalShiftStatus,
ZonalShiftSummary -> Text
zonalShiftId :: Prelude.Text
}
deriving (ZonalShiftSummary -> ZonalShiftSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZonalShiftSummary -> ZonalShiftSummary -> Bool
$c/= :: ZonalShiftSummary -> ZonalShiftSummary -> Bool
== :: ZonalShiftSummary -> ZonalShiftSummary -> Bool
$c== :: ZonalShiftSummary -> ZonalShiftSummary -> Bool
Prelude.Eq, ReadPrec [ZonalShiftSummary]
ReadPrec ZonalShiftSummary
Int -> ReadS ZonalShiftSummary
ReadS [ZonalShiftSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ZonalShiftSummary]
$creadListPrec :: ReadPrec [ZonalShiftSummary]
readPrec :: ReadPrec ZonalShiftSummary
$creadPrec :: ReadPrec ZonalShiftSummary
readList :: ReadS [ZonalShiftSummary]
$creadList :: ReadS [ZonalShiftSummary]
readsPrec :: Int -> ReadS ZonalShiftSummary
$creadsPrec :: Int -> ReadS ZonalShiftSummary
Prelude.Read, Int -> ZonalShiftSummary -> ShowS
[ZonalShiftSummary] -> ShowS
ZonalShiftSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZonalShiftSummary] -> ShowS
$cshowList :: [ZonalShiftSummary] -> ShowS
show :: ZonalShiftSummary -> String
$cshow :: ZonalShiftSummary -> String
showsPrec :: Int -> ZonalShiftSummary -> ShowS
$cshowsPrec :: Int -> ZonalShiftSummary -> ShowS
Prelude.Show, forall x. Rep ZonalShiftSummary x -> ZonalShiftSummary
forall x. ZonalShiftSummary -> Rep ZonalShiftSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ZonalShiftSummary x -> ZonalShiftSummary
$cfrom :: forall x. ZonalShiftSummary -> Rep ZonalShiftSummary x
Prelude.Generic)
newZonalShiftSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.UTCTime ->
ZonalShiftStatus ->
Prelude.Text ->
ZonalShiftSummary
newZonalShiftSummary :: Text
-> Text
-> UTCTime
-> Text
-> UTCTime
-> ZonalShiftStatus
-> Text
-> ZonalShiftSummary
newZonalShiftSummary
Text
pAwayFrom_
Text
pComment_
UTCTime
pExpiryTime_
Text
pResourceIdentifier_
UTCTime
pStartTime_
ZonalShiftStatus
pStatus_
Text
pZonalShiftId_ =
ZonalShiftSummary'
{ $sel:awayFrom:ZonalShiftSummary' :: Text
awayFrom = Text
pAwayFrom_,
$sel:comment:ZonalShiftSummary' :: Text
comment = Text
pComment_,
$sel:expiryTime:ZonalShiftSummary' :: POSIX
expiryTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pExpiryTime_,
$sel:resourceIdentifier:ZonalShiftSummary' :: Text
resourceIdentifier = Text
pResourceIdentifier_,
$sel:startTime:ZonalShiftSummary' :: POSIX
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:status:ZonalShiftSummary' :: ZonalShiftStatus
status = ZonalShiftStatus
pStatus_,
$sel:zonalShiftId:ZonalShiftSummary' :: Text
zonalShiftId = Text
pZonalShiftId_
}
zonalShiftSummary_awayFrom :: Lens.Lens' ZonalShiftSummary Prelude.Text
zonalShiftSummary_awayFrom :: Lens' ZonalShiftSummary Text
zonalShiftSummary_awayFrom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {Text
awayFrom :: Text
$sel:awayFrom:ZonalShiftSummary' :: ZonalShiftSummary -> Text
awayFrom} -> Text
awayFrom) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} Text
a -> ZonalShiftSummary
s {$sel:awayFrom:ZonalShiftSummary' :: Text
awayFrom = Text
a} :: ZonalShiftSummary)
zonalShiftSummary_comment :: Lens.Lens' ZonalShiftSummary Prelude.Text
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {Text
comment :: Text
$sel:comment:ZonalShiftSummary' :: ZonalShiftSummary -> Text
comment} -> Text
comment) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} Text
a -> ZonalShiftSummary
s {$sel:comment:ZonalShiftSummary' :: Text
comment = Text
a} :: ZonalShiftSummary)
zonalShiftSummary_expiryTime :: Lens.Lens' ZonalShiftSummary Prelude.UTCTime
zonalShiftSummary_expiryTime :: Lens' ZonalShiftSummary UTCTime
zonalShiftSummary_expiryTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {POSIX
expiryTime :: POSIX
$sel:expiryTime:ZonalShiftSummary' :: ZonalShiftSummary -> POSIX
expiryTime} -> POSIX
expiryTime) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} POSIX
a -> ZonalShiftSummary
s {$sel:expiryTime:ZonalShiftSummary' :: POSIX
expiryTime = POSIX
a} :: ZonalShiftSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
zonalShiftSummary_resourceIdentifier :: Lens.Lens' ZonalShiftSummary Prelude.Text
zonalShiftSummary_resourceIdentifier :: Lens' ZonalShiftSummary Text
zonalShiftSummary_resourceIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {Text
resourceIdentifier :: Text
$sel:resourceIdentifier:ZonalShiftSummary' :: ZonalShiftSummary -> Text
resourceIdentifier} -> Text
resourceIdentifier) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} Text
a -> ZonalShiftSummary
s {$sel:resourceIdentifier:ZonalShiftSummary' :: Text
resourceIdentifier = Text
a} :: ZonalShiftSummary)
zonalShiftSummary_startTime :: Lens.Lens' ZonalShiftSummary Prelude.UTCTime
zonalShiftSummary_startTime :: Lens' ZonalShiftSummary UTCTime
zonalShiftSummary_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {POSIX
startTime :: POSIX
$sel:startTime:ZonalShiftSummary' :: ZonalShiftSummary -> POSIX
startTime} -> POSIX
startTime) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} POSIX
a -> ZonalShiftSummary
s {$sel:startTime:ZonalShiftSummary' :: POSIX
startTime = POSIX
a} :: ZonalShiftSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
zonalShiftSummary_status :: Lens.Lens' ZonalShiftSummary ZonalShiftStatus
zonalShiftSummary_status :: Lens' ZonalShiftSummary ZonalShiftStatus
zonalShiftSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {ZonalShiftStatus
status :: ZonalShiftStatus
$sel:status:ZonalShiftSummary' :: ZonalShiftSummary -> ZonalShiftStatus
status} -> ZonalShiftStatus
status) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} ZonalShiftStatus
a -> ZonalShiftSummary
s {$sel:status:ZonalShiftSummary' :: ZonalShiftStatus
status = ZonalShiftStatus
a} :: ZonalShiftSummary)
zonalShiftSummary_zonalShiftId :: Lens.Lens' ZonalShiftSummary Prelude.Text
zonalShiftSummary_zonalShiftId :: Lens' ZonalShiftSummary Text
zonalShiftSummary_zonalShiftId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftSummary' {Text
zonalShiftId :: Text
$sel:zonalShiftId:ZonalShiftSummary' :: ZonalShiftSummary -> Text
zonalShiftId} -> Text
zonalShiftId) (\s :: ZonalShiftSummary
s@ZonalShiftSummary' {} Text
a -> ZonalShiftSummary
s {$sel:zonalShiftId:ZonalShiftSummary' :: Text
zonalShiftId = Text
a} :: ZonalShiftSummary)
instance Data.FromJSON ZonalShiftSummary where
parseJSON :: Value -> Parser ZonalShiftSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ZonalShiftSummary"
( \Object
x ->
Text
-> Text
-> POSIX
-> Text
-> POSIX
-> ZonalShiftStatus
-> Text
-> ZonalShiftSummary
ZonalShiftSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"awayFrom")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"comment")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"expiryTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourceIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"startTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"zonalShiftId")
)
instance Prelude.Hashable ZonalShiftSummary where
hashWithSalt :: Int -> ZonalShiftSummary -> Int
hashWithSalt Int
_salt ZonalShiftSummary' {Text
POSIX
ZonalShiftStatus
zonalShiftId :: Text
status :: ZonalShiftStatus
startTime :: POSIX
resourceIdentifier :: Text
expiryTime :: POSIX
comment :: Text
awayFrom :: Text
$sel:zonalShiftId:ZonalShiftSummary' :: ZonalShiftSummary -> Text
$sel:status:ZonalShiftSummary' :: ZonalShiftSummary -> ZonalShiftStatus
$sel:startTime:ZonalShiftSummary' :: ZonalShiftSummary -> POSIX
$sel:resourceIdentifier:ZonalShiftSummary' :: ZonalShiftSummary -> Text
$sel:expiryTime:ZonalShiftSummary' :: ZonalShiftSummary -> POSIX
$sel:comment:ZonalShiftSummary' :: ZonalShiftSummary -> Text
$sel:awayFrom:ZonalShiftSummary' :: ZonalShiftSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awayFrom
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
comment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
expiryTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ZonalShiftStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
zonalShiftId
instance Prelude.NFData ZonalShiftSummary where
rnf :: ZonalShiftSummary -> ()
rnf ZonalShiftSummary' {Text
POSIX
ZonalShiftStatus
zonalShiftId :: Text
status :: ZonalShiftStatus
startTime :: POSIX
resourceIdentifier :: Text
expiryTime :: POSIX
comment :: Text
awayFrom :: Text
$sel:zonalShiftId:ZonalShiftSummary' :: ZonalShiftSummary -> Text
$sel:status:ZonalShiftSummary' :: ZonalShiftSummary -> ZonalShiftStatus
$sel:startTime:ZonalShiftSummary' :: ZonalShiftSummary -> POSIX
$sel:resourceIdentifier:ZonalShiftSummary' :: ZonalShiftSummary -> Text
$sel:expiryTime:ZonalShiftSummary' :: ZonalShiftSummary -> POSIX
$sel:comment:ZonalShiftSummary' :: ZonalShiftSummary -> Text
$sel:awayFrom:ZonalShiftSummary' :: ZonalShiftSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
awayFrom
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
comment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
expiryTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ZonalShiftStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
zonalShiftId