module Stratosphere.ApiGateway.Deployment.AccessLogSettingProperty (
AccessLogSettingProperty(..), mkAccessLogSettingProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessLogSettingProperty
=
AccessLogSettingProperty {AccessLogSettingProperty -> ()
haddock_workaround_ :: (),
AccessLogSettingProperty -> Maybe (Value Text)
destinationArn :: (Prelude.Maybe (Value Prelude.Text)),
AccessLogSettingProperty -> Maybe (Value Text)
format :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AccessLogSettingProperty -> AccessLogSettingProperty -> Bool
(AccessLogSettingProperty -> AccessLogSettingProperty -> Bool)
-> (AccessLogSettingProperty -> AccessLogSettingProperty -> Bool)
-> Eq AccessLogSettingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessLogSettingProperty -> AccessLogSettingProperty -> Bool
== :: AccessLogSettingProperty -> AccessLogSettingProperty -> Bool
$c/= :: AccessLogSettingProperty -> AccessLogSettingProperty -> Bool
/= :: AccessLogSettingProperty -> AccessLogSettingProperty -> Bool
Prelude.Eq, Int -> AccessLogSettingProperty -> ShowS
[AccessLogSettingProperty] -> ShowS
AccessLogSettingProperty -> String
(Int -> AccessLogSettingProperty -> ShowS)
-> (AccessLogSettingProperty -> String)
-> ([AccessLogSettingProperty] -> ShowS)
-> Show AccessLogSettingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessLogSettingProperty -> ShowS
showsPrec :: Int -> AccessLogSettingProperty -> ShowS
$cshow :: AccessLogSettingProperty -> String
show :: AccessLogSettingProperty -> String
$cshowList :: [AccessLogSettingProperty] -> ShowS
showList :: [AccessLogSettingProperty] -> ShowS
Prelude.Show)
mkAccessLogSettingProperty :: AccessLogSettingProperty
mkAccessLogSettingProperty :: AccessLogSettingProperty
mkAccessLogSettingProperty
= AccessLogSettingProperty
{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 AccessLogSettingProperty where
toResourceProperties :: AccessLogSettingProperty -> ResourceProperties
toResourceProperties AccessLogSettingProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingProperty -> ()
destinationArn :: AccessLogSettingProperty -> Maybe (Value Text)
format :: AccessLogSettingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGateway::Deployment.AccessLogSetting",
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 AccessLogSettingProperty where
toJSON :: AccessLogSettingProperty -> Value
toJSON AccessLogSettingProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingProperty -> ()
destinationArn :: AccessLogSettingProperty -> Maybe (Value Text)
format :: AccessLogSettingProperty -> 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" AccessLogSettingProperty where
type PropertyType "DestinationArn" AccessLogSettingProperty = Value Prelude.Text
set :: PropertyType "DestinationArn" AccessLogSettingProperty
-> AccessLogSettingProperty -> AccessLogSettingProperty
set PropertyType "DestinationArn" AccessLogSettingProperty
newValue AccessLogSettingProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingProperty -> ()
destinationArn :: AccessLogSettingProperty -> Maybe (Value Text)
format :: AccessLogSettingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: Maybe (Value Text)
..}
= AccessLogSettingProperty
{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" AccessLogSettingProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
format :: Maybe (Value Text)
haddock_workaround_ :: ()
format :: Maybe (Value Text)
..}
instance Property "Format" AccessLogSettingProperty where
type PropertyType "Format" AccessLogSettingProperty = Value Prelude.Text
set :: PropertyType "Format" AccessLogSettingProperty
-> AccessLogSettingProperty -> AccessLogSettingProperty
set PropertyType "Format" AccessLogSettingProperty
newValue AccessLogSettingProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessLogSettingProperty -> ()
destinationArn :: AccessLogSettingProperty -> Maybe (Value Text)
format :: AccessLogSettingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
format :: Maybe (Value Text)
..}
= AccessLogSettingProperty {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" AccessLogSettingProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
..}