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