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