module Stratosphere.AppMesh.VirtualGateway.LoggingFormatProperty (
        module Exports, LoggingFormatProperty(..), mkLoggingFormatProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.VirtualGateway.JsonFormatRefProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LoggingFormatProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-loggingformat.html>
    LoggingFormatProperty {LoggingFormatProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-loggingformat.html#cfn-appmesh-virtualgateway-loggingformat-json>
                           LoggingFormatProperty -> Maybe [JsonFormatRefProperty]
json :: (Prelude.Maybe [JsonFormatRefProperty]),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-loggingformat.html#cfn-appmesh-virtualgateway-loggingformat-text>
                           LoggingFormatProperty -> Maybe (Value Text)
text :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LoggingFormatProperty -> LoggingFormatProperty -> Bool
(LoggingFormatProperty -> LoggingFormatProperty -> Bool)
-> (LoggingFormatProperty -> LoggingFormatProperty -> Bool)
-> Eq LoggingFormatProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggingFormatProperty -> LoggingFormatProperty -> Bool
== :: LoggingFormatProperty -> LoggingFormatProperty -> Bool
$c/= :: LoggingFormatProperty -> LoggingFormatProperty -> Bool
/= :: LoggingFormatProperty -> LoggingFormatProperty -> Bool
Prelude.Eq, Int -> LoggingFormatProperty -> ShowS
[LoggingFormatProperty] -> ShowS
LoggingFormatProperty -> String
(Int -> LoggingFormatProperty -> ShowS)
-> (LoggingFormatProperty -> String)
-> ([LoggingFormatProperty] -> ShowS)
-> Show LoggingFormatProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggingFormatProperty -> ShowS
showsPrec :: Int -> LoggingFormatProperty -> ShowS
$cshow :: LoggingFormatProperty -> String
show :: LoggingFormatProperty -> String
$cshowList :: [LoggingFormatProperty] -> ShowS
showList :: [LoggingFormatProperty] -> ShowS
Prelude.Show)
mkLoggingFormatProperty :: LoggingFormatProperty
mkLoggingFormatProperty :: LoggingFormatProperty
mkLoggingFormatProperty
  = LoggingFormatProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), json :: Maybe [JsonFormatRefProperty]
json = Maybe [JsonFormatRefProperty]
forall a. Maybe a
Prelude.Nothing,
       text :: Maybe (Value Text)
text = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LoggingFormatProperty where
  toResourceProperties :: LoggingFormatProperty -> ResourceProperties
toResourceProperties LoggingFormatProperty {Maybe [JsonFormatRefProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LoggingFormatProperty -> ()
json :: LoggingFormatProperty -> Maybe [JsonFormatRefProperty]
text :: LoggingFormatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
json :: Maybe [JsonFormatRefProperty]
text :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::VirtualGateway.LoggingFormat",
         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 -> [JsonFormatRefProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Json" ([JsonFormatRefProperty] -> (Key, Value))
-> Maybe [JsonFormatRefProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [JsonFormatRefProperty]
json,
                            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
"Text" (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)
text])}
instance JSON.ToJSON LoggingFormatProperty where
  toJSON :: LoggingFormatProperty -> Value
toJSON LoggingFormatProperty {Maybe [JsonFormatRefProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LoggingFormatProperty -> ()
json :: LoggingFormatProperty -> Maybe [JsonFormatRefProperty]
text :: LoggingFormatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
json :: Maybe [JsonFormatRefProperty]
text :: 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 -> [JsonFormatRefProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Json" ([JsonFormatRefProperty] -> (Key, Value))
-> Maybe [JsonFormatRefProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [JsonFormatRefProperty]
json,
               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
"Text" (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)
text]))
instance Property "Json" LoggingFormatProperty where
  type PropertyType "Json" LoggingFormatProperty = [JsonFormatRefProperty]
  set :: PropertyType "Json" LoggingFormatProperty
-> LoggingFormatProperty -> LoggingFormatProperty
set PropertyType "Json" LoggingFormatProperty
newValue LoggingFormatProperty {Maybe [JsonFormatRefProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LoggingFormatProperty -> ()
json :: LoggingFormatProperty -> Maybe [JsonFormatRefProperty]
text :: LoggingFormatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
json :: Maybe [JsonFormatRefProperty]
text :: Maybe (Value Text)
..}
    = LoggingFormatProperty {json :: Maybe [JsonFormatRefProperty]
json = [JsonFormatRefProperty] -> Maybe [JsonFormatRefProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [JsonFormatRefProperty]
PropertyType "Json" LoggingFormatProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
text :: Maybe (Value Text)
haddock_workaround_ :: ()
text :: Maybe (Value Text)
..}
instance Property "Text" LoggingFormatProperty where
  type PropertyType "Text" LoggingFormatProperty = Value Prelude.Text
  set :: PropertyType "Text" LoggingFormatProperty
-> LoggingFormatProperty -> LoggingFormatProperty
set PropertyType "Text" LoggingFormatProperty
newValue LoggingFormatProperty {Maybe [JsonFormatRefProperty]
Maybe (Value Text)
()
haddock_workaround_ :: LoggingFormatProperty -> ()
json :: LoggingFormatProperty -> Maybe [JsonFormatRefProperty]
text :: LoggingFormatProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
json :: Maybe [JsonFormatRefProperty]
text :: Maybe (Value Text)
..}
    = LoggingFormatProperty {text :: Maybe (Value Text)
text = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Text" LoggingFormatProperty
Value Text
newValue, Maybe [JsonFormatRefProperty]
()
haddock_workaround_ :: ()
json :: Maybe [JsonFormatRefProperty]
haddock_workaround_ :: ()
json :: Maybe [JsonFormatRefProperty]
..}