{-# 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.Lens as Lens
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
(NielsenCBET -> NielsenCBET -> Bool)
-> (NielsenCBET -> NielsenCBET -> Bool) -> Eq NielsenCBET
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]
(Int -> ReadS NielsenCBET)
-> ReadS [NielsenCBET]
-> ReadPrec NielsenCBET
-> ReadPrec [NielsenCBET]
-> Read 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
(Int -> NielsenCBET -> ShowS)
-> (NielsenCBET -> String)
-> ([NielsenCBET] -> ShowS)
-> Show NielsenCBET
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. NielsenCBET -> Rep NielsenCBET x)
-> (forall x. Rep NielsenCBET x -> NielsenCBET)
-> Generic NielsenCBET
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' :: Text -> NielsenWatermarksCbetStepaside -> Text -> NielsenCBET
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 :: (Text -> f Text) -> NielsenCBET -> f NielsenCBET
nielsenCBET_cbetCheckDigitString = (NielsenCBET -> Text)
-> (NielsenCBET -> Text -> NielsenCBET)
-> Lens NielsenCBET NielsenCBET Text Text
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 :: (NielsenWatermarksCbetStepaside
-> f NielsenWatermarksCbetStepaside)
-> NielsenCBET -> f NielsenCBET
nielsenCBET_cbetStepaside = (NielsenCBET -> NielsenWatermarksCbetStepaside)
-> (NielsenCBET -> NielsenWatermarksCbetStepaside -> NielsenCBET)
-> Lens
NielsenCBET
NielsenCBET
NielsenWatermarksCbetStepaside
NielsenWatermarksCbetStepaside
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 :: (Text -> f Text) -> NielsenCBET -> f NielsenCBET
nielsenCBET_csid = (NielsenCBET -> Text)
-> (NielsenCBET -> Text -> NielsenCBET)
-> Lens NielsenCBET NielsenCBET Text Text
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 Core.FromJSON NielsenCBET where
parseJSON :: Value -> Parser NielsenCBET
parseJSON =
String
-> (Object -> Parser NielsenCBET) -> Value -> Parser NielsenCBET
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NielsenCBET"
( \Object
x ->
Text -> NielsenWatermarksCbetStepaside -> Text -> NielsenCBET
NielsenCBET'
(Text -> NielsenWatermarksCbetStepaside -> Text -> NielsenCBET)
-> Parser Text
-> Parser (NielsenWatermarksCbetStepaside -> Text -> NielsenCBET)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"cbetCheckDigitString")
Parser (NielsenWatermarksCbetStepaside -> Text -> NielsenCBET)
-> Parser NielsenWatermarksCbetStepaside
-> Parser (Text -> NielsenCBET)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser NielsenWatermarksCbetStepaside
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"cbetStepaside")
Parser (Text -> NielsenCBET) -> Parser Text -> Parser NielsenCBET
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"csid")
)
instance Prelude.Hashable NielsenCBET
instance Prelude.NFData NielsenCBET
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"cbetCheckDigitString"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
cbetCheckDigitString
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"cbetStepaside" Text -> NielsenWatermarksCbetStepaside -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NielsenWatermarksCbetStepaside
cbetStepaside),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"csid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
csid)
]
)