{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DevOpsGuru.Types.OptInStatus
import qualified Amazonka.Prelude as Prelude
data OpsCenterIntegrationConfig = OpsCenterIntegrationConfig'
{
OpsCenterIntegrationConfig -> Maybe OptInStatus
optInStatus :: Prelude.Maybe OptInStatus
}
deriving (OpsCenterIntegrationConfig -> OpsCenterIntegrationConfig -> Bool
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]
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
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.
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'
{ $sel:optInStatus:OpsCenterIntegrationConfig' :: Maybe OptInStatus
optInStatus =
forall a. Maybe a
Prelude.Nothing
}
opsCenterIntegrationConfig_optInStatus :: Lens.Lens' OpsCenterIntegrationConfig (Prelude.Maybe OptInStatus)
opsCenterIntegrationConfig_optInStatus :: Lens' OpsCenterIntegrationConfig (Maybe OptInStatus)
opsCenterIntegrationConfig_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 where
hashWithSalt :: Int -> OpsCenterIntegrationConfig -> Int
hashWithSalt Int
_salt OpsCenterIntegrationConfig' {Maybe OptInStatus
optInStatus :: Maybe OptInStatus
$sel:optInStatus:OpsCenterIntegrationConfig' :: OpsCenterIntegrationConfig -> Maybe OptInStatus
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OptInStatus
optInStatus
instance Prelude.NFData OpsCenterIntegrationConfig where
rnf :: OpsCenterIntegrationConfig -> ()
rnf OpsCenterIntegrationConfig' {Maybe OptInStatus
optInStatus :: Maybe OptInStatus
$sel:optInStatus:OpsCenterIntegrationConfig' :: OpsCenterIntegrationConfig -> Maybe OptInStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe OptInStatus
optInStatus
instance Data.ToJSON OpsCenterIntegrationConfig where
toJSON :: OpsCenterIntegrationConfig -> Value
toJSON OpsCenterIntegrationConfig' {Maybe OptInStatus
optInStatus :: Maybe OptInStatus
$sel:optInStatus:OpsCenterIntegrationConfig' :: OpsCenterIntegrationConfig -> Maybe OptInStatus
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"OptInStatus" 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 OptInStatus
optInStatus]
)