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