module Stratosphere.LookoutMetrics.AnomalyDetector.JsonFormatDescriptorProperty (
        JsonFormatDescriptorProperty(..), mkJsonFormatDescriptorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JsonFormatDescriptorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html>
    JsonFormatDescriptorProperty {JsonFormatDescriptorProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-jsonformatdescriptor-charset>
                                  JsonFormatDescriptorProperty -> Maybe (Value Text)
charset :: (Prelude.Maybe (Value Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-jsonformatdescriptor-filecompression>
                                  JsonFormatDescriptorProperty -> Maybe (Value Text)
fileCompression :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> Bool
(JsonFormatDescriptorProperty
 -> JsonFormatDescriptorProperty -> Bool)
-> (JsonFormatDescriptorProperty
    -> JsonFormatDescriptorProperty -> Bool)
-> Eq JsonFormatDescriptorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> Bool
== :: JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> Bool
$c/= :: JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> Bool
/= :: JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> Bool
Prelude.Eq, Int -> JsonFormatDescriptorProperty -> ShowS
[JsonFormatDescriptorProperty] -> ShowS
JsonFormatDescriptorProperty -> String
(Int -> JsonFormatDescriptorProperty -> ShowS)
-> (JsonFormatDescriptorProperty -> String)
-> ([JsonFormatDescriptorProperty] -> ShowS)
-> Show JsonFormatDescriptorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JsonFormatDescriptorProperty -> ShowS
showsPrec :: Int -> JsonFormatDescriptorProperty -> ShowS
$cshow :: JsonFormatDescriptorProperty -> String
show :: JsonFormatDescriptorProperty -> String
$cshowList :: [JsonFormatDescriptorProperty] -> ShowS
showList :: [JsonFormatDescriptorProperty] -> ShowS
Prelude.Show)
mkJsonFormatDescriptorProperty :: JsonFormatDescriptorProperty
mkJsonFormatDescriptorProperty :: JsonFormatDescriptorProperty
mkJsonFormatDescriptorProperty
  = JsonFormatDescriptorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), charset :: Maybe (Value Text)
charset = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       fileCompression :: Maybe (Value Text)
fileCompression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JsonFormatDescriptorProperty where
  toResourceProperties :: JsonFormatDescriptorProperty -> ResourceProperties
toResourceProperties JsonFormatDescriptorProperty {Maybe (Value Text)
()
haddock_workaround_ :: JsonFormatDescriptorProperty -> ()
charset :: JsonFormatDescriptorProperty -> Maybe (Value Text)
fileCompression :: JsonFormatDescriptorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
charset :: Maybe (Value Text)
fileCompression :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::LookoutMetrics::AnomalyDetector.JsonFormatDescriptor",
         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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Charset" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
charset,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FileCompression" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
fileCompression])}
instance JSON.ToJSON JsonFormatDescriptorProperty where
  toJSON :: JsonFormatDescriptorProperty -> Value
toJSON JsonFormatDescriptorProperty {Maybe (Value Text)
()
haddock_workaround_ :: JsonFormatDescriptorProperty -> ()
charset :: JsonFormatDescriptorProperty -> Maybe (Value Text)
fileCompression :: JsonFormatDescriptorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
charset :: Maybe (Value Text)
fileCompression :: Maybe (Value Text)
..}
    = [(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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Charset" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
charset,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FileCompression" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
fileCompression]))
instance Property "Charset" JsonFormatDescriptorProperty where
  type PropertyType "Charset" JsonFormatDescriptorProperty = Value Prelude.Text
  set :: PropertyType "Charset" JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> JsonFormatDescriptorProperty
set PropertyType "Charset" JsonFormatDescriptorProperty
newValue JsonFormatDescriptorProperty {Maybe (Value Text)
()
haddock_workaround_ :: JsonFormatDescriptorProperty -> ()
charset :: JsonFormatDescriptorProperty -> Maybe (Value Text)
fileCompression :: JsonFormatDescriptorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
charset :: Maybe (Value Text)
fileCompression :: Maybe (Value Text)
..}
    = JsonFormatDescriptorProperty
        {charset :: Maybe (Value Text)
charset = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Charset" JsonFormatDescriptorProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
fileCompression :: Maybe (Value Text)
haddock_workaround_ :: ()
fileCompression :: Maybe (Value Text)
..}
instance Property "FileCompression" JsonFormatDescriptorProperty where
  type PropertyType "FileCompression" JsonFormatDescriptorProperty = Value Prelude.Text
  set :: PropertyType "FileCompression" JsonFormatDescriptorProperty
-> JsonFormatDescriptorProperty -> JsonFormatDescriptorProperty
set PropertyType "FileCompression" JsonFormatDescriptorProperty
newValue JsonFormatDescriptorProperty {Maybe (Value Text)
()
haddock_workaround_ :: JsonFormatDescriptorProperty -> ()
charset :: JsonFormatDescriptorProperty -> Maybe (Value Text)
fileCompression :: JsonFormatDescriptorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
charset :: Maybe (Value Text)
fileCompression :: Maybe (Value Text)
..}
    = JsonFormatDescriptorProperty
        {fileCompression :: Maybe (Value Text)
fileCompression = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FileCompression" JsonFormatDescriptorProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
charset :: Maybe (Value Text)
haddock_workaround_ :: ()
charset :: Maybe (Value Text)
..}