{-# 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.ConnectContactLens.Types.PointOfInterest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PointOfInterest = PointOfInterest'
{
PointOfInterest -> Natural
beginOffsetMillis :: Prelude.Natural,
PointOfInterest -> Natural
endOffsetMillis :: Prelude.Natural
}
deriving (PointOfInterest -> PointOfInterest -> Bool
(PointOfInterest -> PointOfInterest -> Bool)
-> (PointOfInterest -> PointOfInterest -> Bool)
-> Eq PointOfInterest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PointOfInterest -> PointOfInterest -> Bool
$c/= :: PointOfInterest -> PointOfInterest -> Bool
== :: PointOfInterest -> PointOfInterest -> Bool
$c== :: PointOfInterest -> PointOfInterest -> Bool
Prelude.Eq, ReadPrec [PointOfInterest]
ReadPrec PointOfInterest
Int -> ReadS PointOfInterest
ReadS [PointOfInterest]
(Int -> ReadS PointOfInterest)
-> ReadS [PointOfInterest]
-> ReadPrec PointOfInterest
-> ReadPrec [PointOfInterest]
-> Read PointOfInterest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PointOfInterest]
$creadListPrec :: ReadPrec [PointOfInterest]
readPrec :: ReadPrec PointOfInterest
$creadPrec :: ReadPrec PointOfInterest
readList :: ReadS [PointOfInterest]
$creadList :: ReadS [PointOfInterest]
readsPrec :: Int -> ReadS PointOfInterest
$creadsPrec :: Int -> ReadS PointOfInterest
Prelude.Read, Int -> PointOfInterest -> ShowS
[PointOfInterest] -> ShowS
PointOfInterest -> String
(Int -> PointOfInterest -> ShowS)
-> (PointOfInterest -> String)
-> ([PointOfInterest] -> ShowS)
-> Show PointOfInterest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PointOfInterest] -> ShowS
$cshowList :: [PointOfInterest] -> ShowS
show :: PointOfInterest -> String
$cshow :: PointOfInterest -> String
showsPrec :: Int -> PointOfInterest -> ShowS
$cshowsPrec :: Int -> PointOfInterest -> ShowS
Prelude.Show, (forall x. PointOfInterest -> Rep PointOfInterest x)
-> (forall x. Rep PointOfInterest x -> PointOfInterest)
-> Generic PointOfInterest
forall x. Rep PointOfInterest x -> PointOfInterest
forall x. PointOfInterest -> Rep PointOfInterest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PointOfInterest x -> PointOfInterest
$cfrom :: forall x. PointOfInterest -> Rep PointOfInterest x
Prelude.Generic)
newPointOfInterest ::
Prelude.Natural ->
Prelude.Natural ->
PointOfInterest
newPointOfInterest :: Natural -> Natural -> PointOfInterest
newPointOfInterest
Natural
pBeginOffsetMillis_
Natural
pEndOffsetMillis_ =
PointOfInterest' :: Natural -> Natural -> PointOfInterest
PointOfInterest'
{ $sel:beginOffsetMillis:PointOfInterest' :: Natural
beginOffsetMillis =
Natural
pBeginOffsetMillis_,
$sel:endOffsetMillis:PointOfInterest' :: Natural
endOffsetMillis = Natural
pEndOffsetMillis_
}
pointOfInterest_beginOffsetMillis :: Lens.Lens' PointOfInterest Prelude.Natural
pointOfInterest_beginOffsetMillis :: (Natural -> f Natural) -> PointOfInterest -> f PointOfInterest
pointOfInterest_beginOffsetMillis = (PointOfInterest -> Natural)
-> (PointOfInterest -> Natural -> PointOfInterest)
-> Lens PointOfInterest PointOfInterest Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PointOfInterest' {Natural
beginOffsetMillis :: Natural
$sel:beginOffsetMillis:PointOfInterest' :: PointOfInterest -> Natural
beginOffsetMillis} -> Natural
beginOffsetMillis) (\s :: PointOfInterest
s@PointOfInterest' {} Natural
a -> PointOfInterest
s {$sel:beginOffsetMillis:PointOfInterest' :: Natural
beginOffsetMillis = Natural
a} :: PointOfInterest)
pointOfInterest_endOffsetMillis :: Lens.Lens' PointOfInterest Prelude.Natural
pointOfInterest_endOffsetMillis :: (Natural -> f Natural) -> PointOfInterest -> f PointOfInterest
pointOfInterest_endOffsetMillis = (PointOfInterest -> Natural)
-> (PointOfInterest -> Natural -> PointOfInterest)
-> Lens PointOfInterest PointOfInterest Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PointOfInterest' {Natural
endOffsetMillis :: Natural
$sel:endOffsetMillis:PointOfInterest' :: PointOfInterest -> Natural
endOffsetMillis} -> Natural
endOffsetMillis) (\s :: PointOfInterest
s@PointOfInterest' {} Natural
a -> PointOfInterest
s {$sel:endOffsetMillis:PointOfInterest' :: Natural
endOffsetMillis = Natural
a} :: PointOfInterest)
instance Core.FromJSON PointOfInterest where
parseJSON :: Value -> Parser PointOfInterest
parseJSON =
String
-> (Object -> Parser PointOfInterest)
-> Value
-> Parser PointOfInterest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PointOfInterest"
( \Object
x ->
Natural -> Natural -> PointOfInterest
PointOfInterest'
(Natural -> Natural -> PointOfInterest)
-> Parser Natural -> Parser (Natural -> PointOfInterest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BeginOffsetMillis")
Parser (Natural -> PointOfInterest)
-> Parser Natural -> Parser PointOfInterest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndOffsetMillis")
)
instance Prelude.Hashable PointOfInterest
instance Prelude.NFData PointOfInterest