{-# 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.LookoutEquipment.Types.DatasetSchema where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DatasetSchema = DatasetSchema'
{ DatasetSchema -> Maybe Text
inlineDataSchema :: Prelude.Maybe Prelude.Text
}
deriving (DatasetSchema -> DatasetSchema -> Bool
(DatasetSchema -> DatasetSchema -> Bool)
-> (DatasetSchema -> DatasetSchema -> Bool) -> Eq DatasetSchema
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatasetSchema -> DatasetSchema -> Bool
$c/= :: DatasetSchema -> DatasetSchema -> Bool
== :: DatasetSchema -> DatasetSchema -> Bool
$c== :: DatasetSchema -> DatasetSchema -> Bool
Prelude.Eq, ReadPrec [DatasetSchema]
ReadPrec DatasetSchema
Int -> ReadS DatasetSchema
ReadS [DatasetSchema]
(Int -> ReadS DatasetSchema)
-> ReadS [DatasetSchema]
-> ReadPrec DatasetSchema
-> ReadPrec [DatasetSchema]
-> Read DatasetSchema
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DatasetSchema]
$creadListPrec :: ReadPrec [DatasetSchema]
readPrec :: ReadPrec DatasetSchema
$creadPrec :: ReadPrec DatasetSchema
readList :: ReadS [DatasetSchema]
$creadList :: ReadS [DatasetSchema]
readsPrec :: Int -> ReadS DatasetSchema
$creadsPrec :: Int -> ReadS DatasetSchema
Prelude.Read, Int -> DatasetSchema -> ShowS
[DatasetSchema] -> ShowS
DatasetSchema -> String
(Int -> DatasetSchema -> ShowS)
-> (DatasetSchema -> String)
-> ([DatasetSchema] -> ShowS)
-> Show DatasetSchema
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatasetSchema] -> ShowS
$cshowList :: [DatasetSchema] -> ShowS
show :: DatasetSchema -> String
$cshow :: DatasetSchema -> String
showsPrec :: Int -> DatasetSchema -> ShowS
$cshowsPrec :: Int -> DatasetSchema -> ShowS
Prelude.Show, (forall x. DatasetSchema -> Rep DatasetSchema x)
-> (forall x. Rep DatasetSchema x -> DatasetSchema)
-> Generic DatasetSchema
forall x. Rep DatasetSchema x -> DatasetSchema
forall x. DatasetSchema -> Rep DatasetSchema x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatasetSchema x -> DatasetSchema
$cfrom :: forall x. DatasetSchema -> Rep DatasetSchema x
Prelude.Generic)
newDatasetSchema ::
DatasetSchema
newDatasetSchema :: DatasetSchema
newDatasetSchema =
DatasetSchema' :: Maybe Text -> DatasetSchema
DatasetSchema' {$sel:inlineDataSchema:DatasetSchema' :: Maybe Text
inlineDataSchema = Maybe Text
forall a. Maybe a
Prelude.Nothing}
datasetSchema_inlineDataSchema :: Lens.Lens' DatasetSchema (Prelude.Maybe Prelude.Text)
datasetSchema_inlineDataSchema :: (Maybe Text -> f (Maybe Text)) -> DatasetSchema -> f DatasetSchema
datasetSchema_inlineDataSchema = (DatasetSchema -> Maybe Text)
-> (DatasetSchema -> Maybe Text -> DatasetSchema)
-> Lens DatasetSchema DatasetSchema (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DatasetSchema' {Maybe Text
inlineDataSchema :: Maybe Text
$sel:inlineDataSchema:DatasetSchema' :: DatasetSchema -> Maybe Text
inlineDataSchema} -> Maybe Text
inlineDataSchema) (\s :: DatasetSchema
s@DatasetSchema' {} Maybe Text
a -> DatasetSchema
s {$sel:inlineDataSchema:DatasetSchema' :: Maybe Text
inlineDataSchema = Maybe Text
a} :: DatasetSchema)
instance Prelude.Hashable DatasetSchema
instance Prelude.NFData DatasetSchema
instance Core.ToJSON DatasetSchema where
toJSON :: DatasetSchema -> Value
toJSON DatasetSchema' {Maybe Text
inlineDataSchema :: Maybe Text
$sel:inlineDataSchema:DatasetSchema' :: DatasetSchema -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"InlineDataSchema" 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
inlineDataSchema
]
)