{-# 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.CharacterOffsets where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CharacterOffsets = CharacterOffsets'
{
CharacterOffsets -> Natural
beginOffsetChar :: Prelude.Natural,
CharacterOffsets -> Natural
endOffsetChar :: Prelude.Natural
}
deriving (CharacterOffsets -> CharacterOffsets -> Bool
(CharacterOffsets -> CharacterOffsets -> Bool)
-> (CharacterOffsets -> CharacterOffsets -> Bool)
-> Eq CharacterOffsets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CharacterOffsets -> CharacterOffsets -> Bool
$c/= :: CharacterOffsets -> CharacterOffsets -> Bool
== :: CharacterOffsets -> CharacterOffsets -> Bool
$c== :: CharacterOffsets -> CharacterOffsets -> Bool
Prelude.Eq, ReadPrec [CharacterOffsets]
ReadPrec CharacterOffsets
Int -> ReadS CharacterOffsets
ReadS [CharacterOffsets]
(Int -> ReadS CharacterOffsets)
-> ReadS [CharacterOffsets]
-> ReadPrec CharacterOffsets
-> ReadPrec [CharacterOffsets]
-> Read CharacterOffsets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CharacterOffsets]
$creadListPrec :: ReadPrec [CharacterOffsets]
readPrec :: ReadPrec CharacterOffsets
$creadPrec :: ReadPrec CharacterOffsets
readList :: ReadS [CharacterOffsets]
$creadList :: ReadS [CharacterOffsets]
readsPrec :: Int -> ReadS CharacterOffsets
$creadsPrec :: Int -> ReadS CharacterOffsets
Prelude.Read, Int -> CharacterOffsets -> ShowS
[CharacterOffsets] -> ShowS
CharacterOffsets -> String
(Int -> CharacterOffsets -> ShowS)
-> (CharacterOffsets -> String)
-> ([CharacterOffsets] -> ShowS)
-> Show CharacterOffsets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CharacterOffsets] -> ShowS
$cshowList :: [CharacterOffsets] -> ShowS
show :: CharacterOffsets -> String
$cshow :: CharacterOffsets -> String
showsPrec :: Int -> CharacterOffsets -> ShowS
$cshowsPrec :: Int -> CharacterOffsets -> ShowS
Prelude.Show, (forall x. CharacterOffsets -> Rep CharacterOffsets x)
-> (forall x. Rep CharacterOffsets x -> CharacterOffsets)
-> Generic CharacterOffsets
forall x. Rep CharacterOffsets x -> CharacterOffsets
forall x. CharacterOffsets -> Rep CharacterOffsets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CharacterOffsets x -> CharacterOffsets
$cfrom :: forall x. CharacterOffsets -> Rep CharacterOffsets x
Prelude.Generic)
newCharacterOffsets ::
Prelude.Natural ->
Prelude.Natural ->
CharacterOffsets
newCharacterOffsets :: Natural -> Natural -> CharacterOffsets
newCharacterOffsets Natural
pBeginOffsetChar_ Natural
pEndOffsetChar_ =
CharacterOffsets' :: Natural -> Natural -> CharacterOffsets
CharacterOffsets'
{ $sel:beginOffsetChar:CharacterOffsets' :: Natural
beginOffsetChar =
Natural
pBeginOffsetChar_,
$sel:endOffsetChar:CharacterOffsets' :: Natural
endOffsetChar = Natural
pEndOffsetChar_
}
characterOffsets_beginOffsetChar :: Lens.Lens' CharacterOffsets Prelude.Natural
characterOffsets_beginOffsetChar :: (Natural -> f Natural) -> CharacterOffsets -> f CharacterOffsets
characterOffsets_beginOffsetChar = (CharacterOffsets -> Natural)
-> (CharacterOffsets -> Natural -> CharacterOffsets)
-> Lens CharacterOffsets CharacterOffsets Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CharacterOffsets' {Natural
beginOffsetChar :: Natural
$sel:beginOffsetChar:CharacterOffsets' :: CharacterOffsets -> Natural
beginOffsetChar} -> Natural
beginOffsetChar) (\s :: CharacterOffsets
s@CharacterOffsets' {} Natural
a -> CharacterOffsets
s {$sel:beginOffsetChar:CharacterOffsets' :: Natural
beginOffsetChar = Natural
a} :: CharacterOffsets)
characterOffsets_endOffsetChar :: Lens.Lens' CharacterOffsets Prelude.Natural
characterOffsets_endOffsetChar :: (Natural -> f Natural) -> CharacterOffsets -> f CharacterOffsets
characterOffsets_endOffsetChar = (CharacterOffsets -> Natural)
-> (CharacterOffsets -> Natural -> CharacterOffsets)
-> Lens CharacterOffsets CharacterOffsets Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CharacterOffsets' {Natural
endOffsetChar :: Natural
$sel:endOffsetChar:CharacterOffsets' :: CharacterOffsets -> Natural
endOffsetChar} -> Natural
endOffsetChar) (\s :: CharacterOffsets
s@CharacterOffsets' {} Natural
a -> CharacterOffsets
s {$sel:endOffsetChar:CharacterOffsets' :: Natural
endOffsetChar = Natural
a} :: CharacterOffsets)
instance Core.FromJSON CharacterOffsets where
parseJSON :: Value -> Parser CharacterOffsets
parseJSON =
String
-> (Object -> Parser CharacterOffsets)
-> Value
-> Parser CharacterOffsets
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CharacterOffsets"
( \Object
x ->
Natural -> Natural -> CharacterOffsets
CharacterOffsets'
(Natural -> Natural -> CharacterOffsets)
-> Parser Natural -> Parser (Natural -> CharacterOffsets)
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
"BeginOffsetChar")
Parser (Natural -> CharacterOffsets)
-> Parser Natural -> Parser CharacterOffsets
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
"EndOffsetChar")
)
instance Prelude.Hashable CharacterOffsets
instance Prelude.NFData CharacterOffsets