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