module Stratosphere.LookoutMetrics.AnomalyDetector.FileFormatDescriptorProperty (
module Exports, FileFormatDescriptorProperty(..),
mkFileFormatDescriptorProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.LookoutMetrics.AnomalyDetector.CsvFormatDescriptorProperty as Exports
import {-# SOURCE #-} Stratosphere.LookoutMetrics.AnomalyDetector.JsonFormatDescriptorProperty as Exports
import Stratosphere.ResourceProperties
data FileFormatDescriptorProperty
=
FileFormatDescriptorProperty {FileFormatDescriptorProperty -> ()
haddock_workaround_ :: (),
FileFormatDescriptorProperty -> Maybe CsvFormatDescriptorProperty
csvFormatDescriptor :: (Prelude.Maybe CsvFormatDescriptorProperty),
FileFormatDescriptorProperty -> Maybe JsonFormatDescriptorProperty
jsonFormatDescriptor :: (Prelude.Maybe JsonFormatDescriptorProperty)}
deriving stock (FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool
(FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool)
-> (FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool)
-> Eq FileFormatDescriptorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool
== :: FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool
$c/= :: FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool
/= :: FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> Bool
Prelude.Eq, Int -> FileFormatDescriptorProperty -> ShowS
[FileFormatDescriptorProperty] -> ShowS
FileFormatDescriptorProperty -> String
(Int -> FileFormatDescriptorProperty -> ShowS)
-> (FileFormatDescriptorProperty -> String)
-> ([FileFormatDescriptorProperty] -> ShowS)
-> Show FileFormatDescriptorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileFormatDescriptorProperty -> ShowS
showsPrec :: Int -> FileFormatDescriptorProperty -> ShowS
$cshow :: FileFormatDescriptorProperty -> String
show :: FileFormatDescriptorProperty -> String
$cshowList :: [FileFormatDescriptorProperty] -> ShowS
showList :: [FileFormatDescriptorProperty] -> ShowS
Prelude.Show)
mkFileFormatDescriptorProperty :: FileFormatDescriptorProperty
mkFileFormatDescriptorProperty :: FileFormatDescriptorProperty
mkFileFormatDescriptorProperty
= FileFormatDescriptorProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
csvFormatDescriptor = Maybe CsvFormatDescriptorProperty
forall a. Maybe a
Prelude.Nothing,
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
jsonFormatDescriptor = Maybe JsonFormatDescriptorProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FileFormatDescriptorProperty where
toResourceProperties :: FileFormatDescriptorProperty -> ResourceProperties
toResourceProperties FileFormatDescriptorProperty {Maybe CsvFormatDescriptorProperty
Maybe JsonFormatDescriptorProperty
()
haddock_workaround_ :: FileFormatDescriptorProperty -> ()
csvFormatDescriptor :: FileFormatDescriptorProperty -> Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: FileFormatDescriptorProperty -> Maybe JsonFormatDescriptorProperty
haddock_workaround_ :: ()
csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::LookoutMetrics::AnomalyDetector.FileFormatDescriptor",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CsvFormatDescriptorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CsvFormatDescriptor" (CsvFormatDescriptorProperty -> (Key, Value))
-> Maybe CsvFormatDescriptorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CsvFormatDescriptorProperty
csvFormatDescriptor,
Key -> JsonFormatDescriptorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"JsonFormatDescriptor"
(JsonFormatDescriptorProperty -> (Key, Value))
-> Maybe JsonFormatDescriptorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JsonFormatDescriptorProperty
jsonFormatDescriptor])}
instance JSON.ToJSON FileFormatDescriptorProperty where
toJSON :: FileFormatDescriptorProperty -> Value
toJSON FileFormatDescriptorProperty {Maybe CsvFormatDescriptorProperty
Maybe JsonFormatDescriptorProperty
()
haddock_workaround_ :: FileFormatDescriptorProperty -> ()
csvFormatDescriptor :: FileFormatDescriptorProperty -> Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: FileFormatDescriptorProperty -> Maybe JsonFormatDescriptorProperty
haddock_workaround_ :: ()
csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CsvFormatDescriptorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CsvFormatDescriptor" (CsvFormatDescriptorProperty -> (Key, Value))
-> Maybe CsvFormatDescriptorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CsvFormatDescriptorProperty
csvFormatDescriptor,
Key -> JsonFormatDescriptorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"JsonFormatDescriptor"
(JsonFormatDescriptorProperty -> (Key, Value))
-> Maybe JsonFormatDescriptorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JsonFormatDescriptorProperty
jsonFormatDescriptor]))
instance Property "CsvFormatDescriptor" FileFormatDescriptorProperty where
type PropertyType "CsvFormatDescriptor" FileFormatDescriptorProperty = CsvFormatDescriptorProperty
set :: PropertyType "CsvFormatDescriptor" FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> FileFormatDescriptorProperty
set PropertyType "CsvFormatDescriptor" FileFormatDescriptorProperty
newValue FileFormatDescriptorProperty {Maybe CsvFormatDescriptorProperty
Maybe JsonFormatDescriptorProperty
()
haddock_workaround_ :: FileFormatDescriptorProperty -> ()
csvFormatDescriptor :: FileFormatDescriptorProperty -> Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: FileFormatDescriptorProperty -> Maybe JsonFormatDescriptorProperty
haddock_workaround_ :: ()
csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
..}
= FileFormatDescriptorProperty
{csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
csvFormatDescriptor = CsvFormatDescriptorProperty -> Maybe CsvFormatDescriptorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CsvFormatDescriptor" FileFormatDescriptorProperty
CsvFormatDescriptorProperty
newValue, Maybe JsonFormatDescriptorProperty
()
haddock_workaround_ :: ()
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
haddock_workaround_ :: ()
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
..}
instance Property "JsonFormatDescriptor" FileFormatDescriptorProperty where
type PropertyType "JsonFormatDescriptor" FileFormatDescriptorProperty = JsonFormatDescriptorProperty
set :: PropertyType "JsonFormatDescriptor" FileFormatDescriptorProperty
-> FileFormatDescriptorProperty -> FileFormatDescriptorProperty
set PropertyType "JsonFormatDescriptor" FileFormatDescriptorProperty
newValue FileFormatDescriptorProperty {Maybe CsvFormatDescriptorProperty
Maybe JsonFormatDescriptorProperty
()
haddock_workaround_ :: FileFormatDescriptorProperty -> ()
csvFormatDescriptor :: FileFormatDescriptorProperty -> Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: FileFormatDescriptorProperty -> Maybe JsonFormatDescriptorProperty
haddock_workaround_ :: ()
csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
..}
= FileFormatDescriptorProperty
{jsonFormatDescriptor :: Maybe JsonFormatDescriptorProperty
jsonFormatDescriptor = JsonFormatDescriptorProperty -> Maybe JsonFormatDescriptorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "JsonFormatDescriptor" FileFormatDescriptorProperty
JsonFormatDescriptorProperty
newValue, Maybe CsvFormatDescriptorProperty
()
haddock_workaround_ :: ()
csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
haddock_workaround_ :: ()
csvFormatDescriptor :: Maybe CsvFormatDescriptorProperty
..}