{-# 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.ServiceIntegrationConfig where
import qualified Amazonka.Core as Core
import Amazonka.DevOpsGuru.Types.OpsCenterIntegration
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ServiceIntegrationConfig = ServiceIntegrationConfig'
{
ServiceIntegrationConfig -> Maybe OpsCenterIntegration
opsCenter :: Prelude.Maybe OpsCenterIntegration
}
deriving (ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool
(ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool)
-> (ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool)
-> Eq ServiceIntegrationConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool
$c/= :: ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool
== :: ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool
$c== :: ServiceIntegrationConfig -> ServiceIntegrationConfig -> Bool
Prelude.Eq, ReadPrec [ServiceIntegrationConfig]
ReadPrec ServiceIntegrationConfig
Int -> ReadS ServiceIntegrationConfig
ReadS [ServiceIntegrationConfig]
(Int -> ReadS ServiceIntegrationConfig)
-> ReadS [ServiceIntegrationConfig]
-> ReadPrec ServiceIntegrationConfig
-> ReadPrec [ServiceIntegrationConfig]
-> Read ServiceIntegrationConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceIntegrationConfig]
$creadListPrec :: ReadPrec [ServiceIntegrationConfig]
readPrec :: ReadPrec ServiceIntegrationConfig
$creadPrec :: ReadPrec ServiceIntegrationConfig
readList :: ReadS [ServiceIntegrationConfig]
$creadList :: ReadS [ServiceIntegrationConfig]
readsPrec :: Int -> ReadS ServiceIntegrationConfig
$creadsPrec :: Int -> ReadS ServiceIntegrationConfig
Prelude.Read, Int -> ServiceIntegrationConfig -> ShowS
[ServiceIntegrationConfig] -> ShowS
ServiceIntegrationConfig -> String
(Int -> ServiceIntegrationConfig -> ShowS)
-> (ServiceIntegrationConfig -> String)
-> ([ServiceIntegrationConfig] -> ShowS)
-> Show ServiceIntegrationConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceIntegrationConfig] -> ShowS
$cshowList :: [ServiceIntegrationConfig] -> ShowS
show :: ServiceIntegrationConfig -> String
$cshow :: ServiceIntegrationConfig -> String
showsPrec :: Int -> ServiceIntegrationConfig -> ShowS
$cshowsPrec :: Int -> ServiceIntegrationConfig -> ShowS
Prelude.Show, (forall x.
ServiceIntegrationConfig -> Rep ServiceIntegrationConfig x)
-> (forall x.
Rep ServiceIntegrationConfig x -> ServiceIntegrationConfig)
-> Generic ServiceIntegrationConfig
forall x.
Rep ServiceIntegrationConfig x -> ServiceIntegrationConfig
forall x.
ServiceIntegrationConfig -> Rep ServiceIntegrationConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServiceIntegrationConfig x -> ServiceIntegrationConfig
$cfrom :: forall x.
ServiceIntegrationConfig -> Rep ServiceIntegrationConfig x
Prelude.Generic)
newServiceIntegrationConfig ::
ServiceIntegrationConfig
newServiceIntegrationConfig :: ServiceIntegrationConfig
newServiceIntegrationConfig =
ServiceIntegrationConfig' :: Maybe OpsCenterIntegration -> ServiceIntegrationConfig
ServiceIntegrationConfig'
{ $sel:opsCenter:ServiceIntegrationConfig' :: Maybe OpsCenterIntegration
opsCenter =
Maybe OpsCenterIntegration
forall a. Maybe a
Prelude.Nothing
}
serviceIntegrationConfig_opsCenter :: Lens.Lens' ServiceIntegrationConfig (Prelude.Maybe OpsCenterIntegration)
serviceIntegrationConfig_opsCenter :: (Maybe OpsCenterIntegration -> f (Maybe OpsCenterIntegration))
-> ServiceIntegrationConfig -> f ServiceIntegrationConfig
serviceIntegrationConfig_opsCenter = (ServiceIntegrationConfig -> Maybe OpsCenterIntegration)
-> (ServiceIntegrationConfig
-> Maybe OpsCenterIntegration -> ServiceIntegrationConfig)
-> Lens
ServiceIntegrationConfig
ServiceIntegrationConfig
(Maybe OpsCenterIntegration)
(Maybe OpsCenterIntegration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceIntegrationConfig' {Maybe OpsCenterIntegration
opsCenter :: Maybe OpsCenterIntegration
$sel:opsCenter:ServiceIntegrationConfig' :: ServiceIntegrationConfig -> Maybe OpsCenterIntegration
opsCenter} -> Maybe OpsCenterIntegration
opsCenter) (\s :: ServiceIntegrationConfig
s@ServiceIntegrationConfig' {} Maybe OpsCenterIntegration
a -> ServiceIntegrationConfig
s {$sel:opsCenter:ServiceIntegrationConfig' :: Maybe OpsCenterIntegration
opsCenter = Maybe OpsCenterIntegration
a} :: ServiceIntegrationConfig)
instance Core.FromJSON ServiceIntegrationConfig where
parseJSON :: Value -> Parser ServiceIntegrationConfig
parseJSON =
String
-> (Object -> Parser ServiceIntegrationConfig)
-> Value
-> Parser ServiceIntegrationConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServiceIntegrationConfig"
( \Object
x ->
Maybe OpsCenterIntegration -> ServiceIntegrationConfig
ServiceIntegrationConfig'
(Maybe OpsCenterIntegration -> ServiceIntegrationConfig)
-> Parser (Maybe OpsCenterIntegration)
-> Parser ServiceIntegrationConfig
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe OpsCenterIntegration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OpsCenter")
)
instance Prelude.Hashable ServiceIntegrationConfig
instance Prelude.NFData ServiceIntegrationConfig