module Stratosphere.Route53Resolver.ResolverQueryLoggingConfig (
        ResolverQueryLoggingConfig(..), mkResolverQueryLoggingConfig
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ResolverQueryLoggingConfig
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverqueryloggingconfig.html>
    ResolverQueryLoggingConfig {ResolverQueryLoggingConfig -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverqueryloggingconfig.html#cfn-route53resolver-resolverqueryloggingconfig-destinationarn>
                                ResolverQueryLoggingConfig -> Maybe (Value Text)
destinationArn :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverqueryloggingconfig.html#cfn-route53resolver-resolverqueryloggingconfig-name>
                                ResolverQueryLoggingConfig -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverqueryloggingconfig.html#cfn-route53resolver-resolverqueryloggingconfig-tags>
                                ResolverQueryLoggingConfig -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig -> Bool
(ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig -> Bool)
-> (ResolverQueryLoggingConfig
    -> ResolverQueryLoggingConfig -> Bool)
-> Eq ResolverQueryLoggingConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig -> Bool
== :: ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig -> Bool
$c/= :: ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig -> Bool
/= :: ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig -> Bool
Prelude.Eq, Int -> ResolverQueryLoggingConfig -> ShowS
[ResolverQueryLoggingConfig] -> ShowS
ResolverQueryLoggingConfig -> String
(Int -> ResolverQueryLoggingConfig -> ShowS)
-> (ResolverQueryLoggingConfig -> String)
-> ([ResolverQueryLoggingConfig] -> ShowS)
-> Show ResolverQueryLoggingConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResolverQueryLoggingConfig -> ShowS
showsPrec :: Int -> ResolverQueryLoggingConfig -> ShowS
$cshow :: ResolverQueryLoggingConfig -> String
show :: ResolverQueryLoggingConfig -> String
$cshowList :: [ResolverQueryLoggingConfig] -> ShowS
showList :: [ResolverQueryLoggingConfig] -> ShowS
Prelude.Show)
mkResolverQueryLoggingConfig :: ResolverQueryLoggingConfig
mkResolverQueryLoggingConfig :: ResolverQueryLoggingConfig
mkResolverQueryLoggingConfig
  = ResolverQueryLoggingConfig
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationArn :: Maybe (Value Text)
destinationArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResolverQueryLoggingConfig where
  toResourceProperties :: ResolverQueryLoggingConfig -> ResourceProperties
toResourceProperties ResolverQueryLoggingConfig {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ResolverQueryLoggingConfig -> ()
destinationArn :: ResolverQueryLoggingConfig -> Maybe (Value Text)
name :: ResolverQueryLoggingConfig -> Maybe (Value Text)
tags :: ResolverQueryLoggingConfig -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Route53Resolver::ResolverQueryLoggingConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Name" (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)
name,
                            Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON ResolverQueryLoggingConfig where
  toJSON :: ResolverQueryLoggingConfig -> Value
toJSON ResolverQueryLoggingConfig {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ResolverQueryLoggingConfig -> ()
destinationArn :: ResolverQueryLoggingConfig -> Maybe (Value Text)
name :: ResolverQueryLoggingConfig -> Maybe (Value Text)
tags :: ResolverQueryLoggingConfig -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(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
"Name" (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)
name,
               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "DestinationArn" ResolverQueryLoggingConfig where
  type PropertyType "DestinationArn" ResolverQueryLoggingConfig = Value Prelude.Text
  set :: PropertyType "DestinationArn" ResolverQueryLoggingConfig
-> ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig
set PropertyType "DestinationArn" ResolverQueryLoggingConfig
newValue ResolverQueryLoggingConfig {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ResolverQueryLoggingConfig -> ()
destinationArn :: ResolverQueryLoggingConfig -> Maybe (Value Text)
name :: ResolverQueryLoggingConfig -> Maybe (Value Text)
tags :: ResolverQueryLoggingConfig -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResolverQueryLoggingConfig
        {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" ResolverQueryLoggingConfig
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Name" ResolverQueryLoggingConfig where
  type PropertyType "Name" ResolverQueryLoggingConfig = Value Prelude.Text
  set :: PropertyType "Name" ResolverQueryLoggingConfig
-> ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig
set PropertyType "Name" ResolverQueryLoggingConfig
newValue ResolverQueryLoggingConfig {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ResolverQueryLoggingConfig -> ()
destinationArn :: ResolverQueryLoggingConfig -> Maybe (Value Text)
name :: ResolverQueryLoggingConfig -> Maybe (Value Text)
tags :: ResolverQueryLoggingConfig -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResolverQueryLoggingConfig {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ResolverQueryLoggingConfig
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" ResolverQueryLoggingConfig where
  type PropertyType "Tags" ResolverQueryLoggingConfig = [Tag]
  set :: PropertyType "Tags" ResolverQueryLoggingConfig
-> ResolverQueryLoggingConfig -> ResolverQueryLoggingConfig
set PropertyType "Tags" ResolverQueryLoggingConfig
newValue ResolverQueryLoggingConfig {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ResolverQueryLoggingConfig -> ()
destinationArn :: ResolverQueryLoggingConfig -> Maybe (Value Text)
name :: ResolverQueryLoggingConfig -> Maybe (Value Text)
tags :: ResolverQueryLoggingConfig -> Maybe [Tag]
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResolverQueryLoggingConfig {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ResolverQueryLoggingConfig
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationArn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}