{-# 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.EC2.Types.SlotStartTimeRangeRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data SlotStartTimeRangeRequest = SlotStartTimeRangeRequest'
{
SlotStartTimeRangeRequest -> Maybe ISO8601
earliestTime :: Prelude.Maybe Data.ISO8601,
SlotStartTimeRangeRequest -> Maybe ISO8601
latestTime :: Prelude.Maybe Data.ISO8601
}
deriving (SlotStartTimeRangeRequest -> SlotStartTimeRangeRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SlotStartTimeRangeRequest -> SlotStartTimeRangeRequest -> Bool
$c/= :: SlotStartTimeRangeRequest -> SlotStartTimeRangeRequest -> Bool
== :: SlotStartTimeRangeRequest -> SlotStartTimeRangeRequest -> Bool
$c== :: SlotStartTimeRangeRequest -> SlotStartTimeRangeRequest -> Bool
Prelude.Eq, ReadPrec [SlotStartTimeRangeRequest]
ReadPrec SlotStartTimeRangeRequest
Int -> ReadS SlotStartTimeRangeRequest
ReadS [SlotStartTimeRangeRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SlotStartTimeRangeRequest]
$creadListPrec :: ReadPrec [SlotStartTimeRangeRequest]
readPrec :: ReadPrec SlotStartTimeRangeRequest
$creadPrec :: ReadPrec SlotStartTimeRangeRequest
readList :: ReadS [SlotStartTimeRangeRequest]
$creadList :: ReadS [SlotStartTimeRangeRequest]
readsPrec :: Int -> ReadS SlotStartTimeRangeRequest
$creadsPrec :: Int -> ReadS SlotStartTimeRangeRequest
Prelude.Read, Int -> SlotStartTimeRangeRequest -> ShowS
[SlotStartTimeRangeRequest] -> ShowS
SlotStartTimeRangeRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SlotStartTimeRangeRequest] -> ShowS
$cshowList :: [SlotStartTimeRangeRequest] -> ShowS
show :: SlotStartTimeRangeRequest -> String
$cshow :: SlotStartTimeRangeRequest -> String
showsPrec :: Int -> SlotStartTimeRangeRequest -> ShowS
$cshowsPrec :: Int -> SlotStartTimeRangeRequest -> ShowS
Prelude.Show, forall x.
Rep SlotStartTimeRangeRequest x -> SlotStartTimeRangeRequest
forall x.
SlotStartTimeRangeRequest -> Rep SlotStartTimeRangeRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SlotStartTimeRangeRequest x -> SlotStartTimeRangeRequest
$cfrom :: forall x.
SlotStartTimeRangeRequest -> Rep SlotStartTimeRangeRequest x
Prelude.Generic)
newSlotStartTimeRangeRequest ::
SlotStartTimeRangeRequest
newSlotStartTimeRangeRequest :: SlotStartTimeRangeRequest
newSlotStartTimeRangeRequest =
SlotStartTimeRangeRequest'
{ $sel:earliestTime:SlotStartTimeRangeRequest' :: Maybe ISO8601
earliestTime =
forall a. Maybe a
Prelude.Nothing,
$sel:latestTime:SlotStartTimeRangeRequest' :: Maybe ISO8601
latestTime = forall a. Maybe a
Prelude.Nothing
}
slotStartTimeRangeRequest_earliestTime :: Lens.Lens' SlotStartTimeRangeRequest (Prelude.Maybe Prelude.UTCTime)
slotStartTimeRangeRequest_earliestTime :: Lens' SlotStartTimeRangeRequest (Maybe UTCTime)
slotStartTimeRangeRequest_earliestTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotStartTimeRangeRequest' {Maybe ISO8601
earliestTime :: Maybe ISO8601
$sel:earliestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
earliestTime} -> Maybe ISO8601
earliestTime) (\s :: SlotStartTimeRangeRequest
s@SlotStartTimeRangeRequest' {} Maybe ISO8601
a -> SlotStartTimeRangeRequest
s {$sel:earliestTime:SlotStartTimeRangeRequest' :: Maybe ISO8601
earliestTime = Maybe ISO8601
a} :: SlotStartTimeRangeRequest) 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
slotStartTimeRangeRequest_latestTime :: Lens.Lens' SlotStartTimeRangeRequest (Prelude.Maybe Prelude.UTCTime)
slotStartTimeRangeRequest_latestTime :: Lens' SlotStartTimeRangeRequest (Maybe UTCTime)
slotStartTimeRangeRequest_latestTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SlotStartTimeRangeRequest' {Maybe ISO8601
latestTime :: Maybe ISO8601
$sel:latestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
latestTime} -> Maybe ISO8601
latestTime) (\s :: SlotStartTimeRangeRequest
s@SlotStartTimeRangeRequest' {} Maybe ISO8601
a -> SlotStartTimeRangeRequest
s {$sel:latestTime:SlotStartTimeRangeRequest' :: Maybe ISO8601
latestTime = Maybe ISO8601
a} :: SlotStartTimeRangeRequest) 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
instance Prelude.Hashable SlotStartTimeRangeRequest where
hashWithSalt :: Int -> SlotStartTimeRangeRequest -> Int
hashWithSalt Int
_salt SlotStartTimeRangeRequest' {Maybe ISO8601
latestTime :: Maybe ISO8601
earliestTime :: Maybe ISO8601
$sel:latestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
$sel:earliestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
earliestTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
latestTime
instance Prelude.NFData SlotStartTimeRangeRequest where
rnf :: SlotStartTimeRangeRequest -> ()
rnf SlotStartTimeRangeRequest' {Maybe ISO8601
latestTime :: Maybe ISO8601
earliestTime :: Maybe ISO8601
$sel:latestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
$sel:earliestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
earliestTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
latestTime
instance Data.ToQuery SlotStartTimeRangeRequest where
toQuery :: SlotStartTimeRangeRequest -> QueryString
toQuery SlotStartTimeRangeRequest' {Maybe ISO8601
latestTime :: Maybe ISO8601
earliestTime :: Maybe ISO8601
$sel:latestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
$sel:earliestTime:SlotStartTimeRangeRequest' :: SlotStartTimeRangeRequest -> Maybe ISO8601
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"EarliestTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ISO8601
earliestTime,
ByteString
"LatestTime" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ISO8601
latestTime
]