{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTWireless.Types.WcdmaNmrObj
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.IoTWireless.Types.WcdmaNmrObj 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

-- | Network Measurement Reports.
--
-- /See:/ 'newWcdmaNmrObj' smart constructor.
data WcdmaNmrObj = WcdmaNmrObj'
  { -- | Path loss, or path attenuation, is the reduction in power density of an
    -- electromagnetic wave as it propagates through space.
    WcdmaNmrObj -> Maybe Natural
pathLoss :: Prelude.Maybe Prelude.Natural,
    -- | Received Signal Code Power (signal power) (dBm)
    WcdmaNmrObj -> Maybe Int
rscp :: Prelude.Maybe Prelude.Int,
    -- | WCDMA UTRA Absolute RF Channel Number downlink.
    WcdmaNmrObj -> Natural
uarfcndl :: Prelude.Natural,
    -- | Primary Scrambling Code.
    WcdmaNmrObj -> Natural
psc :: Prelude.Natural,
    -- | UTRAN (UMTS Terrestrial Radio Access Network) Cell Global Identifier.
    WcdmaNmrObj -> Natural
utranCid :: Prelude.Natural
  }
  deriving (WcdmaNmrObj -> WcdmaNmrObj -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WcdmaNmrObj -> WcdmaNmrObj -> Bool
$c/= :: WcdmaNmrObj -> WcdmaNmrObj -> Bool
== :: WcdmaNmrObj -> WcdmaNmrObj -> Bool
$c== :: WcdmaNmrObj -> WcdmaNmrObj -> Bool
Prelude.Eq, ReadPrec [WcdmaNmrObj]
ReadPrec WcdmaNmrObj
Int -> ReadS WcdmaNmrObj
ReadS [WcdmaNmrObj]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WcdmaNmrObj]
$creadListPrec :: ReadPrec [WcdmaNmrObj]
readPrec :: ReadPrec WcdmaNmrObj
$creadPrec :: ReadPrec WcdmaNmrObj
readList :: ReadS [WcdmaNmrObj]
$creadList :: ReadS [WcdmaNmrObj]
readsPrec :: Int -> ReadS WcdmaNmrObj
$creadsPrec :: Int -> ReadS WcdmaNmrObj
Prelude.Read, Int -> WcdmaNmrObj -> ShowS
[WcdmaNmrObj] -> ShowS
WcdmaNmrObj -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WcdmaNmrObj] -> ShowS
$cshowList :: [WcdmaNmrObj] -> ShowS
show :: WcdmaNmrObj -> String
$cshow :: WcdmaNmrObj -> String
showsPrec :: Int -> WcdmaNmrObj -> ShowS
$cshowsPrec :: Int -> WcdmaNmrObj -> ShowS
Prelude.Show, forall x. Rep WcdmaNmrObj x -> WcdmaNmrObj
forall x. WcdmaNmrObj -> Rep WcdmaNmrObj x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WcdmaNmrObj x -> WcdmaNmrObj
$cfrom :: forall x. WcdmaNmrObj -> Rep WcdmaNmrObj x
Prelude.Generic)

-- |
-- Create a value of 'WcdmaNmrObj' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'pathLoss', 'wcdmaNmrObj_pathLoss' - Path loss, or path attenuation, is the reduction in power density of an
-- electromagnetic wave as it propagates through space.
--
-- 'rscp', 'wcdmaNmrObj_rscp' - Received Signal Code Power (signal power) (dBm)
--
-- 'uarfcndl', 'wcdmaNmrObj_uarfcndl' - WCDMA UTRA Absolute RF Channel Number downlink.
--
-- 'psc', 'wcdmaNmrObj_psc' - Primary Scrambling Code.
--
-- 'utranCid', 'wcdmaNmrObj_utranCid' - UTRAN (UMTS Terrestrial Radio Access Network) Cell Global Identifier.
newWcdmaNmrObj ::
  -- | 'uarfcndl'
  Prelude.Natural ->
  -- | 'psc'
  Prelude.Natural ->
  -- | 'utranCid'
  Prelude.Natural ->
  WcdmaNmrObj
newWcdmaNmrObj :: Natural -> Natural -> Natural -> WcdmaNmrObj
newWcdmaNmrObj Natural
pUarfcndl_ Natural
pPsc_ Natural
pUtranCid_ =
  WcdmaNmrObj'
    { $sel:pathLoss:WcdmaNmrObj' :: Maybe Natural
pathLoss = forall a. Maybe a
Prelude.Nothing,
      $sel:rscp:WcdmaNmrObj' :: Maybe Int
rscp = forall a. Maybe a
Prelude.Nothing,
      $sel:uarfcndl:WcdmaNmrObj' :: Natural
uarfcndl = Natural
pUarfcndl_,
      $sel:psc:WcdmaNmrObj' :: Natural
psc = Natural
pPsc_,
      $sel:utranCid:WcdmaNmrObj' :: Natural
utranCid = Natural
pUtranCid_
    }

-- | Path loss, or path attenuation, is the reduction in power density of an
-- electromagnetic wave as it propagates through space.
wcdmaNmrObj_pathLoss :: Lens.Lens' WcdmaNmrObj (Prelude.Maybe Prelude.Natural)
wcdmaNmrObj_pathLoss :: Lens' WcdmaNmrObj (Maybe Natural)
wcdmaNmrObj_pathLoss = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WcdmaNmrObj' {Maybe Natural
pathLoss :: Maybe Natural
$sel:pathLoss:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Natural
pathLoss} -> Maybe Natural
pathLoss) (\s :: WcdmaNmrObj
s@WcdmaNmrObj' {} Maybe Natural
a -> WcdmaNmrObj
s {$sel:pathLoss:WcdmaNmrObj' :: Maybe Natural
pathLoss = Maybe Natural
a} :: WcdmaNmrObj)

-- | Received Signal Code Power (signal power) (dBm)
wcdmaNmrObj_rscp :: Lens.Lens' WcdmaNmrObj (Prelude.Maybe Prelude.Int)
wcdmaNmrObj_rscp :: Lens' WcdmaNmrObj (Maybe Int)
wcdmaNmrObj_rscp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WcdmaNmrObj' {Maybe Int
rscp :: Maybe Int
$sel:rscp:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Int
rscp} -> Maybe Int
rscp) (\s :: WcdmaNmrObj
s@WcdmaNmrObj' {} Maybe Int
a -> WcdmaNmrObj
s {$sel:rscp:WcdmaNmrObj' :: Maybe Int
rscp = Maybe Int
a} :: WcdmaNmrObj)

-- | WCDMA UTRA Absolute RF Channel Number downlink.
wcdmaNmrObj_uarfcndl :: Lens.Lens' WcdmaNmrObj Prelude.Natural
wcdmaNmrObj_uarfcndl :: Lens' WcdmaNmrObj Natural
wcdmaNmrObj_uarfcndl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WcdmaNmrObj' {Natural
uarfcndl :: Natural
$sel:uarfcndl:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
uarfcndl} -> Natural
uarfcndl) (\s :: WcdmaNmrObj
s@WcdmaNmrObj' {} Natural
a -> WcdmaNmrObj
s {$sel:uarfcndl:WcdmaNmrObj' :: Natural
uarfcndl = Natural
a} :: WcdmaNmrObj)

-- | Primary Scrambling Code.
wcdmaNmrObj_psc :: Lens.Lens' WcdmaNmrObj Prelude.Natural
wcdmaNmrObj_psc :: Lens' WcdmaNmrObj Natural
wcdmaNmrObj_psc = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WcdmaNmrObj' {Natural
psc :: Natural
$sel:psc:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
psc} -> Natural
psc) (\s :: WcdmaNmrObj
s@WcdmaNmrObj' {} Natural
a -> WcdmaNmrObj
s {$sel:psc:WcdmaNmrObj' :: Natural
psc = Natural
a} :: WcdmaNmrObj)

-- | UTRAN (UMTS Terrestrial Radio Access Network) Cell Global Identifier.
wcdmaNmrObj_utranCid :: Lens.Lens' WcdmaNmrObj Prelude.Natural
wcdmaNmrObj_utranCid :: Lens' WcdmaNmrObj Natural
wcdmaNmrObj_utranCid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WcdmaNmrObj' {Natural
utranCid :: Natural
$sel:utranCid:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
utranCid} -> Natural
utranCid) (\s :: WcdmaNmrObj
s@WcdmaNmrObj' {} Natural
a -> WcdmaNmrObj
s {$sel:utranCid:WcdmaNmrObj' :: Natural
utranCid = Natural
a} :: WcdmaNmrObj)

instance Prelude.Hashable WcdmaNmrObj where
  hashWithSalt :: Int -> WcdmaNmrObj -> Int
hashWithSalt Int
_salt WcdmaNmrObj' {Natural
Maybe Int
Maybe Natural
utranCid :: Natural
psc :: Natural
uarfcndl :: Natural
rscp :: Maybe Int
pathLoss :: Maybe Natural
$sel:utranCid:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:psc:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:uarfcndl:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:rscp:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Int
$sel:pathLoss:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
pathLoss
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
rscp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
uarfcndl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
psc
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
utranCid

instance Prelude.NFData WcdmaNmrObj where
  rnf :: WcdmaNmrObj -> ()
rnf WcdmaNmrObj' {Natural
Maybe Int
Maybe Natural
utranCid :: Natural
psc :: Natural
uarfcndl :: Natural
rscp :: Maybe Int
pathLoss :: Maybe Natural
$sel:utranCid:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:psc:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:uarfcndl:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:rscp:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Int
$sel:pathLoss:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
pathLoss
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
rscp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
uarfcndl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
psc
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
utranCid

instance Data.ToJSON WcdmaNmrObj where
  toJSON :: WcdmaNmrObj -> Value
toJSON WcdmaNmrObj' {Natural
Maybe Int
Maybe Natural
utranCid :: Natural
psc :: Natural
uarfcndl :: Natural
rscp :: Maybe Int
pathLoss :: Maybe Natural
$sel:utranCid:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:psc:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:uarfcndl:WcdmaNmrObj' :: WcdmaNmrObj -> Natural
$sel:rscp:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Int
$sel:pathLoss:WcdmaNmrObj' :: WcdmaNmrObj -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"PathLoss" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pathLoss,
            (Key
"Rscp" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
rscp,
            forall a. a -> Maybe a
Prelude.Just (Key
"Uarfcndl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
uarfcndl),
            forall a. a -> Maybe a
Prelude.Just (Key
"Psc" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
psc),
            forall a. a -> Maybe a
Prelude.Just (Key
"UtranCid" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
utranCid)
          ]
      )