module Stratosphere.AppMesh.VirtualNode.FileAccessLogProperty (
        module Exports, FileAccessLogProperty(..), mkFileAccessLogProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.VirtualNode.LoggingFormatProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FileAccessLogProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-fileaccesslog.html>
    FileAccessLogProperty {FileAccessLogProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-fileaccesslog.html#cfn-appmesh-virtualnode-fileaccesslog-format>
                           FileAccessLogProperty -> Maybe LoggingFormatProperty
format :: (Prelude.Maybe LoggingFormatProperty),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualnode-fileaccesslog.html#cfn-appmesh-virtualnode-fileaccesslog-path>
                           FileAccessLogProperty -> Value Text
path :: (Value Prelude.Text)}
  deriving stock (FileAccessLogProperty -> FileAccessLogProperty -> Bool
(FileAccessLogProperty -> FileAccessLogProperty -> Bool)
-> (FileAccessLogProperty -> FileAccessLogProperty -> Bool)
-> Eq FileAccessLogProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileAccessLogProperty -> FileAccessLogProperty -> Bool
== :: FileAccessLogProperty -> FileAccessLogProperty -> Bool
$c/= :: FileAccessLogProperty -> FileAccessLogProperty -> Bool
/= :: FileAccessLogProperty -> FileAccessLogProperty -> Bool
Prelude.Eq, Int -> FileAccessLogProperty -> ShowS
[FileAccessLogProperty] -> ShowS
FileAccessLogProperty -> String
(Int -> FileAccessLogProperty -> ShowS)
-> (FileAccessLogProperty -> String)
-> ([FileAccessLogProperty] -> ShowS)
-> Show FileAccessLogProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FileAccessLogProperty -> ShowS
showsPrec :: Int -> FileAccessLogProperty -> ShowS
$cshow :: FileAccessLogProperty -> String
show :: FileAccessLogProperty -> String
$cshowList :: [FileAccessLogProperty] -> ShowS
showList :: [FileAccessLogProperty] -> ShowS
Prelude.Show)
mkFileAccessLogProperty ::
  Value Prelude.Text -> FileAccessLogProperty
mkFileAccessLogProperty :: Value Text -> FileAccessLogProperty
mkFileAccessLogProperty Value Text
path
  = FileAccessLogProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), path :: Value Text
path = Value Text
path, format :: Maybe LoggingFormatProperty
format = Maybe LoggingFormatProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FileAccessLogProperty where
  toResourceProperties :: FileAccessLogProperty -> ResourceProperties
toResourceProperties FileAccessLogProperty {Maybe LoggingFormatProperty
()
Value Text
haddock_workaround_ :: FileAccessLogProperty -> ()
format :: FileAccessLogProperty -> Maybe LoggingFormatProperty
path :: FileAccessLogProperty -> Value Text
haddock_workaround_ :: ()
format :: Maybe LoggingFormatProperty
path :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::VirtualNode.FileAccessLog",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Path" 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..= Value Text
path]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> LoggingFormatProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Format" (LoggingFormatProperty -> (Key, Value))
-> Maybe LoggingFormatProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingFormatProperty
format]))}
instance JSON.ToJSON FileAccessLogProperty where
  toJSON :: FileAccessLogProperty -> Value
toJSON FileAccessLogProperty {Maybe LoggingFormatProperty
()
Value Text
haddock_workaround_ :: FileAccessLogProperty -> ()
format :: FileAccessLogProperty -> Maybe LoggingFormatProperty
path :: FileAccessLogProperty -> Value Text
haddock_workaround_ :: ()
format :: Maybe LoggingFormatProperty
path :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Path" 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..= Value Text
path]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> LoggingFormatProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Format" (LoggingFormatProperty -> (Key, Value))
-> Maybe LoggingFormatProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingFormatProperty
format])))
instance Property "Format" FileAccessLogProperty where
  type PropertyType "Format" FileAccessLogProperty = LoggingFormatProperty
  set :: PropertyType "Format" FileAccessLogProperty
-> FileAccessLogProperty -> FileAccessLogProperty
set PropertyType "Format" FileAccessLogProperty
newValue FileAccessLogProperty {Maybe LoggingFormatProperty
()
Value Text
haddock_workaround_ :: FileAccessLogProperty -> ()
format :: FileAccessLogProperty -> Maybe LoggingFormatProperty
path :: FileAccessLogProperty -> Value Text
haddock_workaround_ :: ()
format :: Maybe LoggingFormatProperty
path :: Value Text
..}
    = FileAccessLogProperty {format :: Maybe LoggingFormatProperty
format = LoggingFormatProperty -> Maybe LoggingFormatProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Format" FileAccessLogProperty
LoggingFormatProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
path :: Value Text
haddock_workaround_ :: ()
path :: Value Text
..}
instance Property "Path" FileAccessLogProperty where
  type PropertyType "Path" FileAccessLogProperty = Value Prelude.Text
  set :: PropertyType "Path" FileAccessLogProperty
-> FileAccessLogProperty -> FileAccessLogProperty
set PropertyType "Path" FileAccessLogProperty
newValue FileAccessLogProperty {Maybe LoggingFormatProperty
()
Value Text
haddock_workaround_ :: FileAccessLogProperty -> ()
format :: FileAccessLogProperty -> Maybe LoggingFormatProperty
path :: FileAccessLogProperty -> Value Text
haddock_workaround_ :: ()
format :: Maybe LoggingFormatProperty
path :: Value Text
..}
    = FileAccessLogProperty {path :: Value Text
path = PropertyType "Path" FileAccessLogProperty
Value Text
newValue, Maybe LoggingFormatProperty
()
haddock_workaround_ :: ()
format :: Maybe LoggingFormatProperty
haddock_workaround_ :: ()
format :: Maybe LoggingFormatProperty
..}