{-# 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.MediaLive.Types.NielsenCBET where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.NielsenWatermarksCbetStepaside
import qualified Amazonka.Prelude as Prelude
data NielsenCBET = NielsenCBET'
{
NielsenCBET -> Text
cbetCheckDigitString :: Prelude.Text,
NielsenCBET -> NielsenWatermarksCbetStepaside
cbetStepaside :: NielsenWatermarksCbetStepaside,
NielsenCBET -> Text
csid :: Prelude.Text
}
deriving (NielsenCBET -> NielsenCBET -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NielsenCBET -> NielsenCBET -> Bool
$c/= :: NielsenCBET -> NielsenCBET -> Bool
== :: NielsenCBET -> NielsenCBET -> Bool
$c== :: NielsenCBET -> NielsenCBET -> Bool
Prelude.Eq, ReadPrec [NielsenCBET]
ReadPrec NielsenCBET
Int -> ReadS NielsenCBET
ReadS [NielsenCBET]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NielsenCBET]
$creadListPrec :: ReadPrec [NielsenCBET]
readPrec :: ReadPrec NielsenCBET
$creadPrec :: ReadPrec NielsenCBET
readList :: ReadS [NielsenCBET]
$creadList :: ReadS [NielsenCBET]
readsPrec :: Int -> ReadS NielsenCBET
$creadsPrec :: Int -> ReadS NielsenCBET
Prelude.Read, Int -> NielsenCBET -> ShowS
[NielsenCBET] -> ShowS
NielsenCBET -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NielsenCBET] -> ShowS
$cshowList :: [NielsenCBET] -> ShowS
show :: NielsenCBET -> String
$cshow :: NielsenCBET -> String
showsPrec :: Int -> NielsenCBET -> ShowS
$cshowsPrec :: Int -> NielsenCBET -> ShowS
Prelude.Show, forall x. Rep NielsenCBET x -> NielsenCBET
forall x. NielsenCBET -> Rep NielsenCBET x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NielsenCBET x -> NielsenCBET
$cfrom :: forall x. NielsenCBET -> Rep NielsenCBET x
Prelude.Generic)
newNielsenCBET ::
Prelude.Text ->
NielsenWatermarksCbetStepaside ->
Prelude.Text ->
NielsenCBET
newNielsenCBET :: Text -> NielsenWatermarksCbetStepaside -> Text -> NielsenCBET
newNielsenCBET
Text
pCbetCheckDigitString_
NielsenWatermarksCbetStepaside
pCbetStepaside_
Text
pCsid_ =
NielsenCBET'
{ $sel:cbetCheckDigitString:NielsenCBET' :: Text
cbetCheckDigitString =
Text
pCbetCheckDigitString_,
$sel:cbetStepaside:NielsenCBET' :: NielsenWatermarksCbetStepaside
cbetStepaside = NielsenWatermarksCbetStepaside
pCbetStepaside_,
$sel:csid:NielsenCBET' :: Text
csid = Text
pCsid_
}
nielsenCBET_cbetCheckDigitString :: Lens.Lens' NielsenCBET Prelude.Text
nielsenCBET_cbetCheckDigitString :: Lens' NielsenCBET Text
nielsenCBET_cbetCheckDigitString = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NielsenCBET' {Text
cbetCheckDigitString :: Text
$sel:cbetCheckDigitString:NielsenCBET' :: NielsenCBET -> Text
cbetCheckDigitString} -> Text
cbetCheckDigitString) (\s :: NielsenCBET
s@NielsenCBET' {} Text
a -> NielsenCBET
s {$sel:cbetCheckDigitString:NielsenCBET' :: Text
cbetCheckDigitString = Text
a} :: NielsenCBET)
nielsenCBET_cbetStepaside :: Lens.Lens' NielsenCBET NielsenWatermarksCbetStepaside
nielsenCBET_cbetStepaside :: Lens' NielsenCBET NielsenWatermarksCbetStepaside
nielsenCBET_cbetStepaside = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NielsenCBET' {NielsenWatermarksCbetStepaside
cbetStepaside :: NielsenWatermarksCbetStepaside
$sel:cbetStepaside:NielsenCBET' :: NielsenCBET -> NielsenWatermarksCbetStepaside
cbetStepaside} -> NielsenWatermarksCbetStepaside
cbetStepaside) (\s :: NielsenCBET
s@NielsenCBET' {} NielsenWatermarksCbetStepaside
a -> NielsenCBET
s {$sel:cbetStepaside:NielsenCBET' :: NielsenWatermarksCbetStepaside
cbetStepaside = NielsenWatermarksCbetStepaside
a} :: NielsenCBET)
nielsenCBET_csid :: Lens.Lens' NielsenCBET Prelude.Text
nielsenCBET_csid :: Lens' NielsenCBET Text
nielsenCBET_csid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NielsenCBET' {Text
csid :: Text
$sel:csid:NielsenCBET' :: NielsenCBET -> Text
csid} -> Text
csid) (\s :: NielsenCBET
s@NielsenCBET' {} Text
a -> NielsenCBET
s {$sel:csid:NielsenCBET' :: Text
csid = Text
a} :: NielsenCBET)
instance Data.FromJSON NielsenCBET where
parseJSON :: Value -> Parser NielsenCBET
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"NielsenCBET"
( \Object
x ->
Text -> NielsenWatermarksCbetStepaside -> Text -> NielsenCBET
NielsenCBET'
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
"cbetCheckDigitString")
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
"cbetStepaside")
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
"csid")
)
instance Prelude.Hashable NielsenCBET where
hashWithSalt :: Int -> NielsenCBET -> Int
hashWithSalt Int
_salt NielsenCBET' {Text
NielsenWatermarksCbetStepaside
csid :: Text
cbetStepaside :: NielsenWatermarksCbetStepaside
cbetCheckDigitString :: Text
$sel:csid:NielsenCBET' :: NielsenCBET -> Text
$sel:cbetStepaside:NielsenCBET' :: NielsenCBET -> NielsenWatermarksCbetStepaside
$sel:cbetCheckDigitString:NielsenCBET' :: NielsenCBET -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
cbetCheckDigitString
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NielsenWatermarksCbetStepaside
cbetStepaside
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
csid
instance Prelude.NFData NielsenCBET where
rnf :: NielsenCBET -> ()
rnf NielsenCBET' {Text
NielsenWatermarksCbetStepaside
csid :: Text
cbetStepaside :: NielsenWatermarksCbetStepaside
cbetCheckDigitString :: Text
$sel:csid:NielsenCBET' :: NielsenCBET -> Text
$sel:cbetStepaside:NielsenCBET' :: NielsenCBET -> NielsenWatermarksCbetStepaside
$sel:cbetCheckDigitString:NielsenCBET' :: NielsenCBET -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
cbetCheckDigitString
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NielsenWatermarksCbetStepaside
cbetStepaside
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
csid
instance Data.ToJSON NielsenCBET where
toJSON :: NielsenCBET -> Value
toJSON NielsenCBET' {Text
NielsenWatermarksCbetStepaside
csid :: Text
cbetStepaside :: NielsenWatermarksCbetStepaside
cbetCheckDigitString :: Text
$sel:csid:NielsenCBET' :: NielsenCBET -> Text
$sel:cbetStepaside:NielsenCBET' :: NielsenCBET -> NielsenWatermarksCbetStepaside
$sel:cbetCheckDigitString:NielsenCBET' :: NielsenCBET -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"cbetCheckDigitString"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
cbetCheckDigitString
),
forall a. a -> Maybe a
Prelude.Just (Key
"cbetStepaside" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NielsenWatermarksCbetStepaside
cbetStepaside),
forall a. a -> Maybe a
Prelude.Just (Key
"csid" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
csid)
]
)