{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CharacterOffsets = CharacterOffsets'
{
CharacterOffsets -> Natural
beginOffsetChar :: Prelude.Natural,
CharacterOffsets -> Natural
endOffsetChar :: Prelude.Natural
}
deriving (CharacterOffsets -> CharacterOffsets -> Bool
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]
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
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. 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'
{ $sel:beginOffsetChar:CharacterOffsets' :: Natural
beginOffsetChar =
Natural
pBeginOffsetChar_,
$sel:endOffsetChar:CharacterOffsets' :: Natural
endOffsetChar = Natural
pEndOffsetChar_
}
characterOffsets_beginOffsetChar :: Lens.Lens' CharacterOffsets Prelude.Natural
characterOffsets_beginOffsetChar :: Lens' CharacterOffsets Natural
characterOffsets_beginOffsetChar = 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 :: Lens' CharacterOffsets Natural
characterOffsets_endOffsetChar = 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 Data.FromJSON CharacterOffsets where
parseJSON :: Value -> Parser CharacterOffsets
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CharacterOffsets"
( \Object
x ->
Natural -> Natural -> CharacterOffsets
CharacterOffsets'
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
"BeginOffsetChar")
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
"EndOffsetChar")
)
instance Prelude.Hashable CharacterOffsets where
hashWithSalt :: Int -> CharacterOffsets -> Int
hashWithSalt Int
_salt CharacterOffsets' {Natural
endOffsetChar :: Natural
beginOffsetChar :: Natural
$sel:endOffsetChar:CharacterOffsets' :: CharacterOffsets -> Natural
$sel:beginOffsetChar:CharacterOffsets' :: CharacterOffsets -> Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
beginOffsetChar
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
endOffsetChar
instance Prelude.NFData CharacterOffsets where
rnf :: CharacterOffsets -> ()
rnf CharacterOffsets' {Natural
endOffsetChar :: Natural
beginOffsetChar :: Natural
$sel:endOffsetChar:CharacterOffsets' :: CharacterOffsets -> Natural
$sel:beginOffsetChar:CharacterOffsets' :: CharacterOffsets -> Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Natural
beginOffsetChar
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
endOffsetChar