{-# 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.DevOpsGuru.Types.UpdateServiceIntegrationConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DevOpsGuru.Types.LogsAnomalyDetectionIntegrationConfig
import Amazonka.DevOpsGuru.Types.OpsCenterIntegrationConfig
import qualified Amazonka.Prelude as Prelude
data UpdateServiceIntegrationConfig = UpdateServiceIntegrationConfig'
{
UpdateServiceIntegrationConfig
-> Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection :: Prelude.Maybe LogsAnomalyDetectionIntegrationConfig,
UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
opsCenter :: Prelude.Maybe OpsCenterIntegrationConfig
}
deriving (UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool
$c/= :: UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool
== :: UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool
$c== :: UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool
Prelude.Eq, ReadPrec [UpdateServiceIntegrationConfig]
ReadPrec UpdateServiceIntegrationConfig
Int -> ReadS UpdateServiceIntegrationConfig
ReadS [UpdateServiceIntegrationConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServiceIntegrationConfig]
$creadListPrec :: ReadPrec [UpdateServiceIntegrationConfig]
readPrec :: ReadPrec UpdateServiceIntegrationConfig
$creadPrec :: ReadPrec UpdateServiceIntegrationConfig
readList :: ReadS [UpdateServiceIntegrationConfig]
$creadList :: ReadS [UpdateServiceIntegrationConfig]
readsPrec :: Int -> ReadS UpdateServiceIntegrationConfig
$creadsPrec :: Int -> ReadS UpdateServiceIntegrationConfig
Prelude.Read, Int -> UpdateServiceIntegrationConfig -> ShowS
[UpdateServiceIntegrationConfig] -> ShowS
UpdateServiceIntegrationConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServiceIntegrationConfig] -> ShowS
$cshowList :: [UpdateServiceIntegrationConfig] -> ShowS
show :: UpdateServiceIntegrationConfig -> String
$cshow :: UpdateServiceIntegrationConfig -> String
showsPrec :: Int -> UpdateServiceIntegrationConfig -> ShowS
$cshowsPrec :: Int -> UpdateServiceIntegrationConfig -> ShowS
Prelude.Show, forall x.
Rep UpdateServiceIntegrationConfig x
-> UpdateServiceIntegrationConfig
forall x.
UpdateServiceIntegrationConfig
-> Rep UpdateServiceIntegrationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServiceIntegrationConfig x
-> UpdateServiceIntegrationConfig
$cfrom :: forall x.
UpdateServiceIntegrationConfig
-> Rep UpdateServiceIntegrationConfig x
Prelude.Generic)
newUpdateServiceIntegrationConfig ::
UpdateServiceIntegrationConfig
newUpdateServiceIntegrationConfig :: UpdateServiceIntegrationConfig
newUpdateServiceIntegrationConfig =
UpdateServiceIntegrationConfig'
{ $sel:logsAnomalyDetection:UpdateServiceIntegrationConfig' :: Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection =
forall a. Maybe a
Prelude.Nothing,
$sel:opsCenter:UpdateServiceIntegrationConfig' :: Maybe OpsCenterIntegrationConfig
opsCenter = forall a. Maybe a
Prelude.Nothing
}
updateServiceIntegrationConfig_logsAnomalyDetection :: Lens.Lens' UpdateServiceIntegrationConfig (Prelude.Maybe LogsAnomalyDetectionIntegrationConfig)
updateServiceIntegrationConfig_logsAnomalyDetection :: Lens'
UpdateServiceIntegrationConfig
(Maybe LogsAnomalyDetectionIntegrationConfig)
updateServiceIntegrationConfig_logsAnomalyDetection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceIntegrationConfig' {Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection :: Maybe LogsAnomalyDetectionIntegrationConfig
$sel:logsAnomalyDetection:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig
-> Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection} -> Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection) (\s :: UpdateServiceIntegrationConfig
s@UpdateServiceIntegrationConfig' {} Maybe LogsAnomalyDetectionIntegrationConfig
a -> UpdateServiceIntegrationConfig
s {$sel:logsAnomalyDetection:UpdateServiceIntegrationConfig' :: Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection = Maybe LogsAnomalyDetectionIntegrationConfig
a} :: UpdateServiceIntegrationConfig)
updateServiceIntegrationConfig_opsCenter :: Lens.Lens' UpdateServiceIntegrationConfig (Prelude.Maybe OpsCenterIntegrationConfig)
updateServiceIntegrationConfig_opsCenter :: Lens'
UpdateServiceIntegrationConfig (Maybe OpsCenterIntegrationConfig)
updateServiceIntegrationConfig_opsCenter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceIntegrationConfig' {Maybe OpsCenterIntegrationConfig
opsCenter :: Maybe OpsCenterIntegrationConfig
$sel:opsCenter:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
opsCenter} -> Maybe OpsCenterIntegrationConfig
opsCenter) (\s :: UpdateServiceIntegrationConfig
s@UpdateServiceIntegrationConfig' {} Maybe OpsCenterIntegrationConfig
a -> UpdateServiceIntegrationConfig
s {$sel:opsCenter:UpdateServiceIntegrationConfig' :: Maybe OpsCenterIntegrationConfig
opsCenter = Maybe OpsCenterIntegrationConfig
a} :: UpdateServiceIntegrationConfig)
instance
Prelude.Hashable
UpdateServiceIntegrationConfig
where
hashWithSalt :: Int -> UpdateServiceIntegrationConfig -> Int
hashWithSalt
Int
_salt
UpdateServiceIntegrationConfig' {Maybe OpsCenterIntegrationConfig
Maybe LogsAnomalyDetectionIntegrationConfig
opsCenter :: Maybe OpsCenterIntegrationConfig
logsAnomalyDetection :: Maybe LogsAnomalyDetectionIntegrationConfig
$sel:opsCenter:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
$sel:logsAnomalyDetection:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig
-> Maybe LogsAnomalyDetectionIntegrationConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OpsCenterIntegrationConfig
opsCenter
instance
Prelude.NFData
UpdateServiceIntegrationConfig
where
rnf :: UpdateServiceIntegrationConfig -> ()
rnf UpdateServiceIntegrationConfig' {Maybe OpsCenterIntegrationConfig
Maybe LogsAnomalyDetectionIntegrationConfig
opsCenter :: Maybe OpsCenterIntegrationConfig
logsAnomalyDetection :: Maybe LogsAnomalyDetectionIntegrationConfig
$sel:opsCenter:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
$sel:logsAnomalyDetection:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig
-> Maybe LogsAnomalyDetectionIntegrationConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OpsCenterIntegrationConfig
opsCenter
instance Data.ToJSON UpdateServiceIntegrationConfig where
toJSON :: UpdateServiceIntegrationConfig -> Value
toJSON UpdateServiceIntegrationConfig' {Maybe OpsCenterIntegrationConfig
Maybe LogsAnomalyDetectionIntegrationConfig
opsCenter :: Maybe OpsCenterIntegrationConfig
logsAnomalyDetection :: Maybe LogsAnomalyDetectionIntegrationConfig
$sel:opsCenter:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
$sel:logsAnomalyDetection:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig
-> Maybe LogsAnomalyDetectionIntegrationConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"LogsAnomalyDetection" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogsAnomalyDetectionIntegrationConfig
logsAnomalyDetection,
(Key
"OpsCenter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpsCenterIntegrationConfig
opsCenter
]
)