{-# 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.ZonalShiftInResource where
import Amazonka.ArcZonalShift.Types.AppliedStatus
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 ZonalShiftInResource = ZonalShiftInResource'
{
ZonalShiftInResource -> AppliedStatus
appliedStatus :: AppliedStatus,
ZonalShiftInResource -> Text
awayFrom :: Prelude.Text,
:: Prelude.Text,
ZonalShiftInResource -> POSIX
expiryTime :: Data.POSIX,
ZonalShiftInResource -> Text
resourceIdentifier :: Prelude.Text,
ZonalShiftInResource -> POSIX
startTime :: Data.POSIX,
ZonalShiftInResource -> Text
zonalShiftId :: Prelude.Text
}
deriving (ZonalShiftInResource -> ZonalShiftInResource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ZonalShiftInResource -> ZonalShiftInResource -> Bool
$c/= :: ZonalShiftInResource -> ZonalShiftInResource -> Bool
== :: ZonalShiftInResource -> ZonalShiftInResource -> Bool
$c== :: ZonalShiftInResource -> ZonalShiftInResource -> Bool
Prelude.Eq, ReadPrec [ZonalShiftInResource]
ReadPrec ZonalShiftInResource
Int -> ReadS ZonalShiftInResource
ReadS [ZonalShiftInResource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ZonalShiftInResource]
$creadListPrec :: ReadPrec [ZonalShiftInResource]
readPrec :: ReadPrec ZonalShiftInResource
$creadPrec :: ReadPrec ZonalShiftInResource
readList :: ReadS [ZonalShiftInResource]
$creadList :: ReadS [ZonalShiftInResource]
readsPrec :: Int -> ReadS ZonalShiftInResource
$creadsPrec :: Int -> ReadS ZonalShiftInResource
Prelude.Read, Int -> ZonalShiftInResource -> ShowS
[ZonalShiftInResource] -> ShowS
ZonalShiftInResource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ZonalShiftInResource] -> ShowS
$cshowList :: [ZonalShiftInResource] -> ShowS
show :: ZonalShiftInResource -> String
$cshow :: ZonalShiftInResource -> String
showsPrec :: Int -> ZonalShiftInResource -> ShowS
$cshowsPrec :: Int -> ZonalShiftInResource -> ShowS
Prelude.Show, forall x. Rep ZonalShiftInResource x -> ZonalShiftInResource
forall x. ZonalShiftInResource -> Rep ZonalShiftInResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ZonalShiftInResource x -> ZonalShiftInResource
$cfrom :: forall x. ZonalShiftInResource -> Rep ZonalShiftInResource x
Prelude.Generic)
newZonalShiftInResource ::
AppliedStatus ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
ZonalShiftInResource
newZonalShiftInResource :: AppliedStatus
-> Text
-> Text
-> UTCTime
-> Text
-> UTCTime
-> Text
-> ZonalShiftInResource
newZonalShiftInResource
AppliedStatus
pAppliedStatus_
Text
pAwayFrom_
Text
pComment_
UTCTime
pExpiryTime_
Text
pResourceIdentifier_
UTCTime
pStartTime_
Text
pZonalShiftId_ =
ZonalShiftInResource'
{ $sel:appliedStatus:ZonalShiftInResource' :: AppliedStatus
appliedStatus =
AppliedStatus
pAppliedStatus_,
$sel:awayFrom:ZonalShiftInResource' :: Text
awayFrom = Text
pAwayFrom_,
$sel:comment:ZonalShiftInResource' :: Text
comment = Text
pComment_,
$sel:expiryTime:ZonalShiftInResource' :: POSIX
expiryTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pExpiryTime_,
$sel:resourceIdentifier:ZonalShiftInResource' :: Text
resourceIdentifier = Text
pResourceIdentifier_,
$sel:startTime:ZonalShiftInResource' :: POSIX
startTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:zonalShiftId:ZonalShiftInResource' :: Text
zonalShiftId = Text
pZonalShiftId_
}
zonalShiftInResource_appliedStatus :: Lens.Lens' ZonalShiftInResource AppliedStatus
zonalShiftInResource_appliedStatus :: Lens' ZonalShiftInResource AppliedStatus
zonalShiftInResource_appliedStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {AppliedStatus
appliedStatus :: AppliedStatus
$sel:appliedStatus:ZonalShiftInResource' :: ZonalShiftInResource -> AppliedStatus
appliedStatus} -> AppliedStatus
appliedStatus) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} AppliedStatus
a -> ZonalShiftInResource
s {$sel:appliedStatus:ZonalShiftInResource' :: AppliedStatus
appliedStatus = AppliedStatus
a} :: ZonalShiftInResource)
zonalShiftInResource_awayFrom :: Lens.Lens' ZonalShiftInResource Prelude.Text
zonalShiftInResource_awayFrom :: Lens' ZonalShiftInResource Text
zonalShiftInResource_awayFrom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {Text
awayFrom :: Text
$sel:awayFrom:ZonalShiftInResource' :: ZonalShiftInResource -> Text
awayFrom} -> Text
awayFrom) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} Text
a -> ZonalShiftInResource
s {$sel:awayFrom:ZonalShiftInResource' :: Text
awayFrom = Text
a} :: ZonalShiftInResource)
zonalShiftInResource_comment :: Lens.Lens' ZonalShiftInResource Prelude.Text
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {Text
comment :: Text
$sel:comment:ZonalShiftInResource' :: ZonalShiftInResource -> Text
comment} -> Text
comment) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} Text
a -> ZonalShiftInResource
s {$sel:comment:ZonalShiftInResource' :: Text
comment = Text
a} :: ZonalShiftInResource)
zonalShiftInResource_expiryTime :: Lens.Lens' ZonalShiftInResource Prelude.UTCTime
zonalShiftInResource_expiryTime :: Lens' ZonalShiftInResource UTCTime
zonalShiftInResource_expiryTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {POSIX
expiryTime :: POSIX
$sel:expiryTime:ZonalShiftInResource' :: ZonalShiftInResource -> POSIX
expiryTime} -> POSIX
expiryTime) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} POSIX
a -> ZonalShiftInResource
s {$sel:expiryTime:ZonalShiftInResource' :: POSIX
expiryTime = POSIX
a} :: ZonalShiftInResource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
zonalShiftInResource_resourceIdentifier :: Lens.Lens' ZonalShiftInResource Prelude.Text
zonalShiftInResource_resourceIdentifier :: Lens' ZonalShiftInResource Text
zonalShiftInResource_resourceIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {Text
resourceIdentifier :: Text
$sel:resourceIdentifier:ZonalShiftInResource' :: ZonalShiftInResource -> Text
resourceIdentifier} -> Text
resourceIdentifier) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} Text
a -> ZonalShiftInResource
s {$sel:resourceIdentifier:ZonalShiftInResource' :: Text
resourceIdentifier = Text
a} :: ZonalShiftInResource)
zonalShiftInResource_startTime :: Lens.Lens' ZonalShiftInResource Prelude.UTCTime
zonalShiftInResource_startTime :: Lens' ZonalShiftInResource UTCTime
zonalShiftInResource_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {POSIX
startTime :: POSIX
$sel:startTime:ZonalShiftInResource' :: ZonalShiftInResource -> POSIX
startTime} -> POSIX
startTime) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} POSIX
a -> ZonalShiftInResource
s {$sel:startTime:ZonalShiftInResource' :: POSIX
startTime = POSIX
a} :: ZonalShiftInResource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
zonalShiftInResource_zonalShiftId :: Lens.Lens' ZonalShiftInResource Prelude.Text
zonalShiftInResource_zonalShiftId :: Lens' ZonalShiftInResource Text
zonalShiftInResource_zonalShiftId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ZonalShiftInResource' {Text
zonalShiftId :: Text
$sel:zonalShiftId:ZonalShiftInResource' :: ZonalShiftInResource -> Text
zonalShiftId} -> Text
zonalShiftId) (\s :: ZonalShiftInResource
s@ZonalShiftInResource' {} Text
a -> ZonalShiftInResource
s {$sel:zonalShiftId:ZonalShiftInResource' :: Text
zonalShiftId = Text
a} :: ZonalShiftInResource)
instance Data.FromJSON ZonalShiftInResource where
parseJSON :: Value -> Parser ZonalShiftInResource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ZonalShiftInResource"
( \Object
x ->
AppliedStatus
-> Text
-> Text
-> POSIX
-> Text
-> POSIX
-> Text
-> ZonalShiftInResource
ZonalShiftInResource'
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
"appliedStatus")
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
"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
"zonalShiftId")
)
instance Prelude.Hashable ZonalShiftInResource where
hashWithSalt :: Int -> ZonalShiftInResource -> Int
hashWithSalt Int
_salt ZonalShiftInResource' {Text
POSIX
AppliedStatus
zonalShiftId :: Text
startTime :: POSIX
resourceIdentifier :: Text
expiryTime :: POSIX
comment :: Text
awayFrom :: Text
appliedStatus :: AppliedStatus
$sel:zonalShiftId:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:startTime:ZonalShiftInResource' :: ZonalShiftInResource -> POSIX
$sel:resourceIdentifier:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:expiryTime:ZonalShiftInResource' :: ZonalShiftInResource -> POSIX
$sel:comment:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:awayFrom:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:appliedStatus:ZonalShiftInResource' :: ZonalShiftInResource -> AppliedStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AppliedStatus
appliedStatus
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` Text
zonalShiftId
instance Prelude.NFData ZonalShiftInResource where
rnf :: ZonalShiftInResource -> ()
rnf ZonalShiftInResource' {Text
POSIX
AppliedStatus
zonalShiftId :: Text
startTime :: POSIX
resourceIdentifier :: Text
expiryTime :: POSIX
comment :: Text
awayFrom :: Text
appliedStatus :: AppliedStatus
$sel:zonalShiftId:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:startTime:ZonalShiftInResource' :: ZonalShiftInResource -> POSIX
$sel:resourceIdentifier:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:expiryTime:ZonalShiftInResource' :: ZonalShiftInResource -> POSIX
$sel:comment:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:awayFrom:ZonalShiftInResource' :: ZonalShiftInResource -> Text
$sel:appliedStatus:ZonalShiftInResource' :: ZonalShiftInResource -> AppliedStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf AppliedStatus
appliedStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
zonalShiftId