module Stratosphere.ApiGatewayV2.Stage.AccessLogSettingsProperty (
        AccessLogSettingsProperty(..), mkAccessLogSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessLogSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html>
    AccessLogSettingsProperty {AccessLogSettingsProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html#cfn-apigatewayv2-stage-accesslogsettings-destinationarn>
                               AccessLogSettingsProperty -> Maybe (Value Text)
destinationArn :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html#cfn-apigatewayv2-stage-accesslogsettings-format>
                               AccessLogSettingsProperty -> Maybe (Value Text)
format :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool
(AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool)
-> (AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool)
-> Eq AccessLogSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool
== :: AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool
$c/= :: AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool
/= :: AccessLogSettingsProperty -> AccessLogSettingsProperty -> Bool
Prelude.Eq, Int -> AccessLogSettingsProperty -> ShowS
[AccessLogSettingsProperty] -> ShowS
AccessLogSettingsProperty -> String
(Int -> AccessLogSettingsProperty -> ShowS)
-> (AccessLogSettingsProperty -> String)
-> ([AccessLogSettingsProperty] -> ShowS)
-> Show AccessLogSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessLogSettingsProperty -> ShowS
showsPrec :: Int -> AccessLogSettingsProperty -> ShowS
$cshow :: AccessLogSettingsProperty -> String
show :: AccessLogSettingsProperty -> String
$cshowList :: [AccessLogSettingsProperty] -> ShowS
showList :: [AccessLogSettingsProperty] -> ShowS
Prelude.Show)
mkAccessLogSettingsProperty :: AccessLogSettingsProperty
mkAccessLogSettingsProperty :: AccessLogSettingsProperty
mkAccessLogSettingsProperty
  = AccessLogSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationArn :: Maybe (Value Text)
destinationArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       format :: Maybe (Value Text)
format = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessLogSettingsProperty where
  toResourceProperties :: AccessLogSettingsProperty -> ResourceProperties
toResourceProperties AccessLogSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingsProperty -> ()
destinationArn :: AccessLogSettingsProperty -> Maybe (Value Text)
format :: AccessLogSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::Stage.AccessLogSettings",
         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
"DestinationArn" (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)
destinationArn,
                            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
"Format" (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)
format])}
instance JSON.ToJSON AccessLogSettingsProperty where
  toJSON :: AccessLogSettingsProperty -> Value
toJSON AccessLogSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingsProperty -> ()
destinationArn :: AccessLogSettingsProperty -> Maybe (Value Text)
format :: AccessLogSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: 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
"DestinationArn" (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)
destinationArn,
               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
"Format" (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)
format]))
instance Property "DestinationArn" AccessLogSettingsProperty where
  type PropertyType "DestinationArn" AccessLogSettingsProperty = Value Prelude.Text
  set :: PropertyType "DestinationArn" AccessLogSettingsProperty
-> AccessLogSettingsProperty -> AccessLogSettingsProperty
set PropertyType "DestinationArn" AccessLogSettingsProperty
newValue AccessLogSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingsProperty -> ()
destinationArn :: AccessLogSettingsProperty -> Maybe (Value Text)
format :: AccessLogSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: Maybe (Value Text)
..}
    = AccessLogSettingsProperty
        {destinationArn :: Maybe (Value Text)
destinationArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationArn" AccessLogSettingsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
format :: Maybe (Value Text)
haddock_workaround_ :: ()
format :: Maybe (Value Text)
..}
instance Property "Format" AccessLogSettingsProperty where
  type PropertyType "Format" AccessLogSettingsProperty = Value Prelude.Text
  set :: PropertyType "Format" AccessLogSettingsProperty
-> AccessLogSettingsProperty -> AccessLogSettingsProperty
set PropertyType "Format" AccessLogSettingsProperty
newValue AccessLogSettingsProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingsProperty -> ()
destinationArn :: AccessLogSettingsProperty -> Maybe (Value Text)
format :: AccessLogSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: Maybe (Value Text)
..}
    = AccessLogSettingsProperty {format :: Maybe (Value Text)
format = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Format" AccessLogSettingsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
..}