module Stratosphere.DataZone.PolicyGrant.CreateAssetTypePolicyGrantDetailProperty (
        CreateAssetTypePolicyGrantDetailProperty(..),
        mkCreateAssetTypePolicyGrantDetailProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CreateAssetTypePolicyGrantDetailProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-policygrant-createassettypepolicygrantdetail.html>
    CreateAssetTypePolicyGrantDetailProperty {CreateAssetTypePolicyGrantDetailProperty -> ()
haddock_workaround_ :: (),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-policygrant-createassettypepolicygrantdetail.html#cfn-datazone-policygrant-createassettypepolicygrantdetail-includechilddomainunits>
                                              CreateAssetTypePolicyGrantDetailProperty -> Maybe (Value Bool)
includeChildDomainUnits :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty -> Bool
(CreateAssetTypePolicyGrantDetailProperty
 -> CreateAssetTypePolicyGrantDetailProperty -> Bool)
-> (CreateAssetTypePolicyGrantDetailProperty
    -> CreateAssetTypePolicyGrantDetailProperty -> Bool)
-> Eq CreateAssetTypePolicyGrantDetailProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty -> Bool
== :: CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty -> Bool
$c/= :: CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty -> Bool
/= :: CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty -> Bool
Prelude.Eq, Int -> CreateAssetTypePolicyGrantDetailProperty -> ShowS
[CreateAssetTypePolicyGrantDetailProperty] -> ShowS
CreateAssetTypePolicyGrantDetailProperty -> String
(Int -> CreateAssetTypePolicyGrantDetailProperty -> ShowS)
-> (CreateAssetTypePolicyGrantDetailProperty -> String)
-> ([CreateAssetTypePolicyGrantDetailProperty] -> ShowS)
-> Show CreateAssetTypePolicyGrantDetailProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreateAssetTypePolicyGrantDetailProperty -> ShowS
showsPrec :: Int -> CreateAssetTypePolicyGrantDetailProperty -> ShowS
$cshow :: CreateAssetTypePolicyGrantDetailProperty -> String
show :: CreateAssetTypePolicyGrantDetailProperty -> String
$cshowList :: [CreateAssetTypePolicyGrantDetailProperty] -> ShowS
showList :: [CreateAssetTypePolicyGrantDetailProperty] -> ShowS
Prelude.Show)
mkCreateAssetTypePolicyGrantDetailProperty ::
  CreateAssetTypePolicyGrantDetailProperty
mkCreateAssetTypePolicyGrantDetailProperty :: CreateAssetTypePolicyGrantDetailProperty
mkCreateAssetTypePolicyGrantDetailProperty
  = CreateAssetTypePolicyGrantDetailProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       includeChildDomainUnits :: Maybe (Value Bool)
includeChildDomainUnits = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CreateAssetTypePolicyGrantDetailProperty where
  toResourceProperties :: CreateAssetTypePolicyGrantDetailProperty -> ResourceProperties
toResourceProperties CreateAssetTypePolicyGrantDetailProperty {Maybe (Value Bool)
()
haddock_workaround_ :: CreateAssetTypePolicyGrantDetailProperty -> ()
includeChildDomainUnits :: CreateAssetTypePolicyGrantDetailProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
includeChildDomainUnits :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataZone::PolicyGrant.CreateAssetTypePolicyGrantDetail",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IncludeChildDomainUnits"
                              (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
includeChildDomainUnits])}
instance JSON.ToJSON CreateAssetTypePolicyGrantDetailProperty where
  toJSON :: CreateAssetTypePolicyGrantDetailProperty -> Value
toJSON CreateAssetTypePolicyGrantDetailProperty {Maybe (Value Bool)
()
haddock_workaround_ :: CreateAssetTypePolicyGrantDetailProperty -> ()
includeChildDomainUnits :: CreateAssetTypePolicyGrantDetailProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
includeChildDomainUnits :: Maybe (Value Bool)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IncludeChildDomainUnits"
                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
includeChildDomainUnits]))
instance Property "IncludeChildDomainUnits" CreateAssetTypePolicyGrantDetailProperty where
  type PropertyType "IncludeChildDomainUnits" CreateAssetTypePolicyGrantDetailProperty = Value Prelude.Bool
  set :: PropertyType
  "IncludeChildDomainUnits" CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty
-> CreateAssetTypePolicyGrantDetailProperty
set PropertyType
  "IncludeChildDomainUnits" CreateAssetTypePolicyGrantDetailProperty
newValue CreateAssetTypePolicyGrantDetailProperty {Maybe (Value Bool)
()
haddock_workaround_ :: CreateAssetTypePolicyGrantDetailProperty -> ()
includeChildDomainUnits :: CreateAssetTypePolicyGrantDetailProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
includeChildDomainUnits :: Maybe (Value Bool)
..}
    = CreateAssetTypePolicyGrantDetailProperty
        {includeChildDomainUnits :: Maybe (Value Bool)
includeChildDomainUnits = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "IncludeChildDomainUnits" CreateAssetTypePolicyGrantDetailProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}