{-# 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.IoTWireless.Types.GlobalIdentity 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 GlobalIdentity = GlobalIdentity'
{
GlobalIdentity -> Natural
lac :: Prelude.Natural,
GlobalIdentity -> Natural
geranCid :: Prelude.Natural
}
deriving (GlobalIdentity -> GlobalIdentity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlobalIdentity -> GlobalIdentity -> Bool
$c/= :: GlobalIdentity -> GlobalIdentity -> Bool
== :: GlobalIdentity -> GlobalIdentity -> Bool
$c== :: GlobalIdentity -> GlobalIdentity -> Bool
Prelude.Eq, ReadPrec [GlobalIdentity]
ReadPrec GlobalIdentity
Int -> ReadS GlobalIdentity
ReadS [GlobalIdentity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlobalIdentity]
$creadListPrec :: ReadPrec [GlobalIdentity]
readPrec :: ReadPrec GlobalIdentity
$creadPrec :: ReadPrec GlobalIdentity
readList :: ReadS [GlobalIdentity]
$creadList :: ReadS [GlobalIdentity]
readsPrec :: Int -> ReadS GlobalIdentity
$creadsPrec :: Int -> ReadS GlobalIdentity
Prelude.Read, Int -> GlobalIdentity -> ShowS
[GlobalIdentity] -> ShowS
GlobalIdentity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlobalIdentity] -> ShowS
$cshowList :: [GlobalIdentity] -> ShowS
show :: GlobalIdentity -> String
$cshow :: GlobalIdentity -> String
showsPrec :: Int -> GlobalIdentity -> ShowS
$cshowsPrec :: Int -> GlobalIdentity -> ShowS
Prelude.Show, forall x. Rep GlobalIdentity x -> GlobalIdentity
forall x. GlobalIdentity -> Rep GlobalIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GlobalIdentity x -> GlobalIdentity
$cfrom :: forall x. GlobalIdentity -> Rep GlobalIdentity x
Prelude.Generic)
newGlobalIdentity ::
Prelude.Natural ->
Prelude.Natural ->
GlobalIdentity
newGlobalIdentity :: Natural -> Natural -> GlobalIdentity
newGlobalIdentity Natural
pLac_ Natural
pGeranCid_ =
GlobalIdentity' {$sel:lac:GlobalIdentity' :: Natural
lac = Natural
pLac_, $sel:geranCid:GlobalIdentity' :: Natural
geranCid = Natural
pGeranCid_}
globalIdentity_lac :: Lens.Lens' GlobalIdentity Prelude.Natural
globalIdentity_lac :: Lens' GlobalIdentity Natural
globalIdentity_lac = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalIdentity' {Natural
lac :: Natural
$sel:lac:GlobalIdentity' :: GlobalIdentity -> Natural
lac} -> Natural
lac) (\s :: GlobalIdentity
s@GlobalIdentity' {} Natural
a -> GlobalIdentity
s {$sel:lac:GlobalIdentity' :: Natural
lac = Natural
a} :: GlobalIdentity)
globalIdentity_geranCid :: Lens.Lens' GlobalIdentity Prelude.Natural
globalIdentity_geranCid :: Lens' GlobalIdentity Natural
globalIdentity_geranCid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlobalIdentity' {Natural
geranCid :: Natural
$sel:geranCid:GlobalIdentity' :: GlobalIdentity -> Natural
geranCid} -> Natural
geranCid) (\s :: GlobalIdentity
s@GlobalIdentity' {} Natural
a -> GlobalIdentity
s {$sel:geranCid:GlobalIdentity' :: Natural
geranCid = Natural
a} :: GlobalIdentity)
instance Prelude.Hashable GlobalIdentity where
hashWithSalt :: Int -> GlobalIdentity -> Int
hashWithSalt Int
_salt GlobalIdentity' {Natural
geranCid :: Natural
lac :: Natural
$sel:geranCid:GlobalIdentity' :: GlobalIdentity -> Natural
$sel:lac:GlobalIdentity' :: GlobalIdentity -> Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
lac
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
geranCid
instance Prelude.NFData GlobalIdentity where
rnf :: GlobalIdentity -> ()
rnf GlobalIdentity' {Natural
geranCid :: Natural
lac :: Natural
$sel:geranCid:GlobalIdentity' :: GlobalIdentity -> Natural
$sel:lac:GlobalIdentity' :: GlobalIdentity -> Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Natural
lac seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
geranCid
instance Data.ToJSON GlobalIdentity where
toJSON :: GlobalIdentity -> Value
toJSON GlobalIdentity' {Natural
geranCid :: Natural
lac :: Natural
$sel:geranCid:GlobalIdentity' :: GlobalIdentity -> Natural
$sel:lac:GlobalIdentity' :: GlobalIdentity -> Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"Lac" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
lac),
forall a. a -> Maybe a
Prelude.Just (Key
"GeranCid" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
geranCid)
]
)