{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Route53.Types.QueryLoggingConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53.Internal
data QueryLoggingConfig = QueryLoggingConfig'
{
QueryLoggingConfig -> Text
id :: Prelude.Text,
QueryLoggingConfig -> ResourceId
hostedZoneId :: ResourceId,
QueryLoggingConfig -> Text
cloudWatchLogsLogGroupArn :: Prelude.Text
}
deriving (QueryLoggingConfig -> QueryLoggingConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QueryLoggingConfig -> QueryLoggingConfig -> Bool
$c/= :: QueryLoggingConfig -> QueryLoggingConfig -> Bool
== :: QueryLoggingConfig -> QueryLoggingConfig -> Bool
$c== :: QueryLoggingConfig -> QueryLoggingConfig -> Bool
Prelude.Eq, ReadPrec [QueryLoggingConfig]
ReadPrec QueryLoggingConfig
Int -> ReadS QueryLoggingConfig
ReadS [QueryLoggingConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QueryLoggingConfig]
$creadListPrec :: ReadPrec [QueryLoggingConfig]
readPrec :: ReadPrec QueryLoggingConfig
$creadPrec :: ReadPrec QueryLoggingConfig
readList :: ReadS [QueryLoggingConfig]
$creadList :: ReadS [QueryLoggingConfig]
readsPrec :: Int -> ReadS QueryLoggingConfig
$creadsPrec :: Int -> ReadS QueryLoggingConfig
Prelude.Read, Int -> QueryLoggingConfig -> ShowS
[QueryLoggingConfig] -> ShowS
QueryLoggingConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QueryLoggingConfig] -> ShowS
$cshowList :: [QueryLoggingConfig] -> ShowS
show :: QueryLoggingConfig -> String
$cshow :: QueryLoggingConfig -> String
showsPrec :: Int -> QueryLoggingConfig -> ShowS
$cshowsPrec :: Int -> QueryLoggingConfig -> ShowS
Prelude.Show, forall x. Rep QueryLoggingConfig x -> QueryLoggingConfig
forall x. QueryLoggingConfig -> Rep QueryLoggingConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QueryLoggingConfig x -> QueryLoggingConfig
$cfrom :: forall x. QueryLoggingConfig -> Rep QueryLoggingConfig x
Prelude.Generic)
newQueryLoggingConfig ::
Prelude.Text ->
ResourceId ->
Prelude.Text ->
QueryLoggingConfig
newQueryLoggingConfig :: Text -> ResourceId -> Text -> QueryLoggingConfig
newQueryLoggingConfig
Text
pId_
ResourceId
pHostedZoneId_
Text
pCloudWatchLogsLogGroupArn_ =
QueryLoggingConfig'
{ $sel:id:QueryLoggingConfig' :: Text
id = Text
pId_,
$sel:hostedZoneId:QueryLoggingConfig' :: ResourceId
hostedZoneId = ResourceId
pHostedZoneId_,
$sel:cloudWatchLogsLogGroupArn:QueryLoggingConfig' :: Text
cloudWatchLogsLogGroupArn =
Text
pCloudWatchLogsLogGroupArn_
}
queryLoggingConfig_id :: Lens.Lens' QueryLoggingConfig Prelude.Text
queryLoggingConfig_id :: Lens' QueryLoggingConfig Text
queryLoggingConfig_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryLoggingConfig' {Text
id :: Text
$sel:id:QueryLoggingConfig' :: QueryLoggingConfig -> Text
id} -> Text
id) (\s :: QueryLoggingConfig
s@QueryLoggingConfig' {} Text
a -> QueryLoggingConfig
s {$sel:id:QueryLoggingConfig' :: Text
id = Text
a} :: QueryLoggingConfig)
queryLoggingConfig_hostedZoneId :: Lens.Lens' QueryLoggingConfig ResourceId
queryLoggingConfig_hostedZoneId :: Lens' QueryLoggingConfig ResourceId
queryLoggingConfig_hostedZoneId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryLoggingConfig' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:QueryLoggingConfig' :: QueryLoggingConfig -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: QueryLoggingConfig
s@QueryLoggingConfig' {} ResourceId
a -> QueryLoggingConfig
s {$sel:hostedZoneId:QueryLoggingConfig' :: ResourceId
hostedZoneId = ResourceId
a} :: QueryLoggingConfig)
queryLoggingConfig_cloudWatchLogsLogGroupArn :: Lens.Lens' QueryLoggingConfig Prelude.Text
queryLoggingConfig_cloudWatchLogsLogGroupArn :: Lens' QueryLoggingConfig Text
queryLoggingConfig_cloudWatchLogsLogGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QueryLoggingConfig' {Text
cloudWatchLogsLogGroupArn :: Text
$sel:cloudWatchLogsLogGroupArn:QueryLoggingConfig' :: QueryLoggingConfig -> Text
cloudWatchLogsLogGroupArn} -> Text
cloudWatchLogsLogGroupArn) (\s :: QueryLoggingConfig
s@QueryLoggingConfig' {} Text
a -> QueryLoggingConfig
s {$sel:cloudWatchLogsLogGroupArn:QueryLoggingConfig' :: Text
cloudWatchLogsLogGroupArn = Text
a} :: QueryLoggingConfig)
instance Data.FromXML QueryLoggingConfig where
parseXML :: [Node] -> Either String QueryLoggingConfig
parseXML [Node]
x =
Text -> ResourceId -> Text -> QueryLoggingConfig
QueryLoggingConfig'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"HostedZoneId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"CloudWatchLogsLogGroupArn")
instance Prelude.Hashable QueryLoggingConfig where
hashWithSalt :: Int -> QueryLoggingConfig -> Int
hashWithSalt Int
_salt QueryLoggingConfig' {Text
ResourceId
cloudWatchLogsLogGroupArn :: Text
hostedZoneId :: ResourceId
id :: Text
$sel:cloudWatchLogsLogGroupArn:QueryLoggingConfig' :: QueryLoggingConfig -> Text
$sel:hostedZoneId:QueryLoggingConfig' :: QueryLoggingConfig -> ResourceId
$sel:id:QueryLoggingConfig' :: QueryLoggingConfig -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceId
hostedZoneId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
cloudWatchLogsLogGroupArn
instance Prelude.NFData QueryLoggingConfig where
rnf :: QueryLoggingConfig -> ()
rnf QueryLoggingConfig' {Text
ResourceId
cloudWatchLogsLogGroupArn :: Text
hostedZoneId :: ResourceId
id :: Text
$sel:cloudWatchLogsLogGroupArn:QueryLoggingConfig' :: QueryLoggingConfig -> Text
$sel:hostedZoneId:QueryLoggingConfig' :: QueryLoggingConfig -> ResourceId
$sel:id:QueryLoggingConfig' :: QueryLoggingConfig -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceId
hostedZoneId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
cloudWatchLogsLogGroupArn