{-# 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.Panorama.Types.ManifestOverridesPayload where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ManifestOverridesPayload = ManifestOverridesPayload'
{
ManifestOverridesPayload -> Maybe Text
payloadData :: Prelude.Maybe Prelude.Text
}
deriving (ManifestOverridesPayload -> ManifestOverridesPayload -> Bool
(ManifestOverridesPayload -> ManifestOverridesPayload -> Bool)
-> (ManifestOverridesPayload -> ManifestOverridesPayload -> Bool)
-> Eq ManifestOverridesPayload
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ManifestOverridesPayload -> ManifestOverridesPayload -> Bool
$c/= :: ManifestOverridesPayload -> ManifestOverridesPayload -> Bool
== :: ManifestOverridesPayload -> ManifestOverridesPayload -> Bool
$c== :: ManifestOverridesPayload -> ManifestOverridesPayload -> Bool
Prelude.Eq, ReadPrec [ManifestOverridesPayload]
ReadPrec ManifestOverridesPayload
Int -> ReadS ManifestOverridesPayload
ReadS [ManifestOverridesPayload]
(Int -> ReadS ManifestOverridesPayload)
-> ReadS [ManifestOverridesPayload]
-> ReadPrec ManifestOverridesPayload
-> ReadPrec [ManifestOverridesPayload]
-> Read ManifestOverridesPayload
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ManifestOverridesPayload]
$creadListPrec :: ReadPrec [ManifestOverridesPayload]
readPrec :: ReadPrec ManifestOverridesPayload
$creadPrec :: ReadPrec ManifestOverridesPayload
readList :: ReadS [ManifestOverridesPayload]
$creadList :: ReadS [ManifestOverridesPayload]
readsPrec :: Int -> ReadS ManifestOverridesPayload
$creadsPrec :: Int -> ReadS ManifestOverridesPayload
Prelude.Read, Int -> ManifestOverridesPayload -> ShowS
[ManifestOverridesPayload] -> ShowS
ManifestOverridesPayload -> String
(Int -> ManifestOverridesPayload -> ShowS)
-> (ManifestOverridesPayload -> String)
-> ([ManifestOverridesPayload] -> ShowS)
-> Show ManifestOverridesPayload
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ManifestOverridesPayload] -> ShowS
$cshowList :: [ManifestOverridesPayload] -> ShowS
show :: ManifestOverridesPayload -> String
$cshow :: ManifestOverridesPayload -> String
showsPrec :: Int -> ManifestOverridesPayload -> ShowS
$cshowsPrec :: Int -> ManifestOverridesPayload -> ShowS
Prelude.Show, (forall x.
ManifestOverridesPayload -> Rep ManifestOverridesPayload x)
-> (forall x.
Rep ManifestOverridesPayload x -> ManifestOverridesPayload)
-> Generic ManifestOverridesPayload
forall x.
Rep ManifestOverridesPayload x -> ManifestOverridesPayload
forall x.
ManifestOverridesPayload -> Rep ManifestOverridesPayload x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ManifestOverridesPayload x -> ManifestOverridesPayload
$cfrom :: forall x.
ManifestOverridesPayload -> Rep ManifestOverridesPayload x
Prelude.Generic)
newManifestOverridesPayload ::
ManifestOverridesPayload
newManifestOverridesPayload :: ManifestOverridesPayload
newManifestOverridesPayload =
ManifestOverridesPayload' :: Maybe Text -> ManifestOverridesPayload
ManifestOverridesPayload'
{ $sel:payloadData:ManifestOverridesPayload' :: Maybe Text
payloadData =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
manifestOverridesPayload_payloadData :: Lens.Lens' ManifestOverridesPayload (Prelude.Maybe Prelude.Text)
manifestOverridesPayload_payloadData :: (Maybe Text -> f (Maybe Text))
-> ManifestOverridesPayload -> f ManifestOverridesPayload
manifestOverridesPayload_payloadData = (ManifestOverridesPayload -> Maybe Text)
-> (ManifestOverridesPayload
-> Maybe Text -> ManifestOverridesPayload)
-> Lens
ManifestOverridesPayload
ManifestOverridesPayload
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManifestOverridesPayload' {Maybe Text
payloadData :: Maybe Text
$sel:payloadData:ManifestOverridesPayload' :: ManifestOverridesPayload -> Maybe Text
payloadData} -> Maybe Text
payloadData) (\s :: ManifestOverridesPayload
s@ManifestOverridesPayload' {} Maybe Text
a -> ManifestOverridesPayload
s {$sel:payloadData:ManifestOverridesPayload' :: Maybe Text
payloadData = Maybe Text
a} :: ManifestOverridesPayload)
instance Core.FromJSON ManifestOverridesPayload where
parseJSON :: Value -> Parser ManifestOverridesPayload
parseJSON =
String
-> (Object -> Parser ManifestOverridesPayload)
-> Value
-> Parser ManifestOverridesPayload
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ManifestOverridesPayload"
( \Object
x ->
Maybe Text -> ManifestOverridesPayload
ManifestOverridesPayload'
(Maybe Text -> ManifestOverridesPayload)
-> Parser (Maybe Text) -> Parser ManifestOverridesPayload
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PayloadData")
)
instance Prelude.Hashable ManifestOverridesPayload
instance Prelude.NFData ManifestOverridesPayload
instance Core.ToJSON ManifestOverridesPayload where
toJSON :: ManifestOverridesPayload -> Value
toJSON ManifestOverridesPayload' {Maybe Text
payloadData :: Maybe Text
$sel:payloadData:ManifestOverridesPayload' :: ManifestOverridesPayload -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"PayloadData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
payloadData]
)