{-# 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.ZonalShift 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 ZonalShift = ZonalShift'
{
ZonalShift -> Text
awayFrom :: Prelude.Text,
:: Prelude.Text,
ZonalShift -> POSIX
expiryTime :: Data.POSIX,
ZonalShift -> Text
resourceIdentifier :: Prelude.Text,
ZonalShift -> POSIX
startTime :: Data.POSIX,
ZonalShift -> ZonalShiftStatus
status :: ZonalShiftStatus,
ZonalShift -> Text
zonalShiftId :: Prelude.Text
}
deriving (ZonalShift -> ZonalShift -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZonalShift -> ZonalShift -> Bool
$c/= :: ZonalShift -> ZonalShift -> Bool
== :: ZonalShift -> ZonalShift -> Bool
$c== :: ZonalShift -> ZonalShift -> Bool
Prelude.Eq, ReadPrec [ZonalShift]
ReadPrec ZonalShift
Int -> ReadS ZonalShift
ReadS [ZonalShift]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ZonalShift]
$creadListPrec :: ReadPrec [ZonalShift]
readPrec :: ReadPrec ZonalShift
$creadPrec :: ReadPrec ZonalShift
readList :: ReadS [ZonalShift]
$creadList :: ReadS [ZonalShift]
readsPrec :: Int -> ReadS ZonalShift
$creadsPrec :: Int -> ReadS ZonalShift
Prelude.Read, Int -> ZonalShift -> ShowS
[ZonalShift] -> ShowS
ZonalShift -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZonalShift] -> ShowS
$cshowList :: [ZonalShift] -> ShowS
show :: ZonalShift -> String
$cshow :: ZonalShift -> String
showsPrec :: Int -> ZonalShift -> ShowS
$cshowsPrec :: Int -> ZonalShift -> ShowS
Prelude.Show, forall x. Rep ZonalShift x -> ZonalShift
forall x. ZonalShift -> Rep ZonalShift x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ZonalShift x -> ZonalShift
$cfrom :: forall x. ZonalShift -> Rep ZonalShift x
Prelude.Generic)
newZonalShift ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.UTCTime ->
ZonalShiftStatus ->
Prelude.Text ->
ZonalShift
newZonalShift :: Text
-> Text
-> UTCTime
-> Text
-> UTCTime
-> ZonalShiftStatus
-> Text
-> ZonalShift
newZonalShift
Text
pAwayFrom_
Text
pComment_
UTCTime
pExpiryTime_
Text
pResourceIdentifier_
UTCTime
pStartTime_
ZonalShiftStatus
pStatus_
Text
pZonalShiftId_ =
ZonalShift'
{ $sel:awayFrom:ZonalShift' :: Text
awayFrom = Text
pAwayFrom_,
$sel:comment:ZonalShift' :: Text
comment = Text
pComment_,
$sel:expiryTime:ZonalShift' :: POSIX
expiryTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pExpiryTime_,
$sel:resourceIdentifier:ZonalShift' :: Text
resourceIdentifier = Text
pResourceIdentifier_,
$sel:startTime:ZonalShift' :: POSIX
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:status:ZonalShift' :: ZonalShiftStatus
status = ZonalShiftStatus
pStatus_,
$sel:zonalShiftId:ZonalShift' :: Text
zonalShiftId = Text
pZonalShiftId_
}
zonalShift_awayFrom :: Lens.Lens' ZonalShift Prelude.Text
zonalShift_awayFrom :: Lens' ZonalShift Text
zonalShift_awayFrom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {Text
awayFrom :: Text
$sel:awayFrom:ZonalShift' :: ZonalShift -> Text
awayFrom} -> Text
awayFrom) (\s :: ZonalShift
s@ZonalShift' {} Text
a -> ZonalShift
s {$sel:awayFrom:ZonalShift' :: Text
awayFrom = Text
a} :: ZonalShift)
zonalShift_comment :: Lens.Lens' ZonalShift Prelude.Text
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {Text
comment :: Text
$sel:comment:ZonalShift' :: ZonalShift -> Text
comment} -> Text
comment) (\s :: ZonalShift
s@ZonalShift' {} Text
a -> ZonalShift
s {$sel:comment:ZonalShift' :: Text
comment = Text
a} :: ZonalShift)
zonalShift_expiryTime :: Lens.Lens' ZonalShift Prelude.UTCTime
zonalShift_expiryTime :: Lens' ZonalShift UTCTime
zonalShift_expiryTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {POSIX
expiryTime :: POSIX
$sel:expiryTime:ZonalShift' :: ZonalShift -> POSIX
expiryTime} -> POSIX
expiryTime) (\s :: ZonalShift
s@ZonalShift' {} POSIX
a -> ZonalShift
s {$sel:expiryTime:ZonalShift' :: POSIX
expiryTime = POSIX
a} :: ZonalShift) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
zonalShift_resourceIdentifier :: Lens.Lens' ZonalShift Prelude.Text
zonalShift_resourceIdentifier :: Lens' ZonalShift Text
zonalShift_resourceIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {Text
resourceIdentifier :: Text
$sel:resourceIdentifier:ZonalShift' :: ZonalShift -> Text
resourceIdentifier} -> Text
resourceIdentifier) (\s :: ZonalShift
s@ZonalShift' {} Text
a -> ZonalShift
s {$sel:resourceIdentifier:ZonalShift' :: Text
resourceIdentifier = Text
a} :: ZonalShift)
zonalShift_startTime :: Lens.Lens' ZonalShift Prelude.UTCTime
zonalShift_startTime :: Lens' ZonalShift UTCTime
zonalShift_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {POSIX
startTime :: POSIX
$sel:startTime:ZonalShift' :: ZonalShift -> POSIX
startTime} -> POSIX
startTime) (\s :: ZonalShift
s@ZonalShift' {} POSIX
a -> ZonalShift
s {$sel:startTime:ZonalShift' :: POSIX
startTime = POSIX
a} :: ZonalShift) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
zonalShift_status :: Lens.Lens' ZonalShift ZonalShiftStatus
zonalShift_status :: Lens' ZonalShift ZonalShiftStatus
zonalShift_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {ZonalShiftStatus
status :: ZonalShiftStatus
$sel:status:ZonalShift' :: ZonalShift -> ZonalShiftStatus
status} -> ZonalShiftStatus
status) (\s :: ZonalShift
s@ZonalShift' {} ZonalShiftStatus
a -> ZonalShift
s {$sel:status:ZonalShift' :: ZonalShiftStatus
status = ZonalShiftStatus
a} :: ZonalShift)
zonalShift_zonalShiftId :: Lens.Lens' ZonalShift Prelude.Text
zonalShift_zonalShiftId :: Lens' ZonalShift Text
zonalShift_zonalShiftId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShift' {Text
zonalShiftId :: Text
$sel:zonalShiftId:ZonalShift' :: ZonalShift -> Text
zonalShiftId} -> Text
zonalShiftId) (\s :: ZonalShift
s@ZonalShift' {} Text
a -> ZonalShift
s {$sel:zonalShiftId:ZonalShift' :: Text
zonalShiftId = Text
a} :: ZonalShift)
instance Data.FromJSON ZonalShift where
parseJSON :: Value -> Parser ZonalShift
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ZonalShift"
( \Object
x ->
Text
-> Text
-> POSIX
-> Text
-> POSIX
-> ZonalShiftStatus
-> Text
-> ZonalShift
ZonalShift'
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 ZonalShift where
hashWithSalt :: Int -> ZonalShift -> Int
hashWithSalt Int
_salt ZonalShift' {Text
POSIX
ZonalShiftStatus
zonalShiftId :: Text
status :: ZonalShiftStatus
startTime :: POSIX
resourceIdentifier :: Text
expiryTime :: POSIX
comment :: Text
awayFrom :: Text
$sel:zonalShiftId:ZonalShift' :: ZonalShift -> Text
$sel:status:ZonalShift' :: ZonalShift -> ZonalShiftStatus
$sel:startTime:ZonalShift' :: ZonalShift -> POSIX
$sel:resourceIdentifier:ZonalShift' :: ZonalShift -> Text
$sel:expiryTime:ZonalShift' :: ZonalShift -> POSIX
$sel:comment:ZonalShift' :: ZonalShift -> Text
$sel:awayFrom:ZonalShift' :: ZonalShift -> 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 ZonalShift where
rnf :: ZonalShift -> ()
rnf ZonalShift' {Text
POSIX
ZonalShiftStatus
zonalShiftId :: Text
status :: ZonalShiftStatus
startTime :: POSIX
resourceIdentifier :: Text
expiryTime :: POSIX
comment :: Text
awayFrom :: Text
$sel:zonalShiftId:ZonalShift' :: ZonalShift -> Text
$sel:status:ZonalShift' :: ZonalShift -> ZonalShiftStatus
$sel:startTime:ZonalShift' :: ZonalShift -> POSIX
$sel:resourceIdentifier:ZonalShift' :: ZonalShift -> Text
$sel:expiryTime:ZonalShift' :: ZonalShift -> POSIX
$sel:comment:ZonalShift' :: ZonalShift -> Text
$sel:awayFrom:ZonalShift' :: ZonalShift -> 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