{-# 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 Amazonka.DevOpsGuru.Types.OpsCenterIntegrationConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateServiceIntegrationConfig = UpdateServiceIntegrationConfig'
{ UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
opsCenter :: Prelude.Maybe OpsCenterIntegrationConfig
}
deriving (UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool
(UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool)
-> (UpdateServiceIntegrationConfig
-> UpdateServiceIntegrationConfig -> Bool)
-> Eq UpdateServiceIntegrationConfig
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]
(Int -> ReadS UpdateServiceIntegrationConfig)
-> ReadS [UpdateServiceIntegrationConfig]
-> ReadPrec UpdateServiceIntegrationConfig
-> ReadPrec [UpdateServiceIntegrationConfig]
-> Read 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
(Int -> UpdateServiceIntegrationConfig -> ShowS)
-> (UpdateServiceIntegrationConfig -> String)
-> ([UpdateServiceIntegrationConfig] -> ShowS)
-> Show UpdateServiceIntegrationConfig
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.
UpdateServiceIntegrationConfig
-> Rep UpdateServiceIntegrationConfig x)
-> (forall x.
Rep UpdateServiceIntegrationConfig x
-> UpdateServiceIntegrationConfig)
-> Generic UpdateServiceIntegrationConfig
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' :: Maybe OpsCenterIntegrationConfig -> UpdateServiceIntegrationConfig
UpdateServiceIntegrationConfig'
{ $sel:opsCenter:UpdateServiceIntegrationConfig' :: Maybe OpsCenterIntegrationConfig
opsCenter =
Maybe OpsCenterIntegrationConfig
forall a. Maybe a
Prelude.Nothing
}
updateServiceIntegrationConfig_opsCenter :: Lens.Lens' UpdateServiceIntegrationConfig (Prelude.Maybe OpsCenterIntegrationConfig)
updateServiceIntegrationConfig_opsCenter :: (Maybe OpsCenterIntegrationConfig
-> f (Maybe OpsCenterIntegrationConfig))
-> UpdateServiceIntegrationConfig
-> f UpdateServiceIntegrationConfig
updateServiceIntegrationConfig_opsCenter = (UpdateServiceIntegrationConfig
-> Maybe OpsCenterIntegrationConfig)
-> (UpdateServiceIntegrationConfig
-> Maybe OpsCenterIntegrationConfig
-> UpdateServiceIntegrationConfig)
-> Lens
UpdateServiceIntegrationConfig
UpdateServiceIntegrationConfig
(Maybe OpsCenterIntegrationConfig)
(Maybe OpsCenterIntegrationConfig)
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
instance
Prelude.NFData
UpdateServiceIntegrationConfig
instance Core.ToJSON UpdateServiceIntegrationConfig where
toJSON :: UpdateServiceIntegrationConfig -> Value
toJSON UpdateServiceIntegrationConfig' {Maybe OpsCenterIntegrationConfig
opsCenter :: Maybe OpsCenterIntegrationConfig
$sel:opsCenter:UpdateServiceIntegrationConfig' :: UpdateServiceIntegrationConfig -> Maybe OpsCenterIntegrationConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"OpsCenter" Text -> OpsCenterIntegrationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OpsCenterIntegrationConfig -> Pair)
-> Maybe OpsCenterIntegrationConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OpsCenterIntegrationConfig
opsCenter]
)