module Stratosphere.PCAConnectorAD.DirectoryRegistration (
        DirectoryRegistration(..), mkDirectoryRegistration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DirectoryRegistration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcaconnectorad-directoryregistration.html>
    DirectoryRegistration {DirectoryRegistration -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcaconnectorad-directoryregistration.html#cfn-pcaconnectorad-directoryregistration-directoryid>
                           DirectoryRegistration -> Value Text
directoryId :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcaconnectorad-directoryregistration.html#cfn-pcaconnectorad-directoryregistration-tags>
                           DirectoryRegistration -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (DirectoryRegistration -> DirectoryRegistration -> Bool
(DirectoryRegistration -> DirectoryRegistration -> Bool)
-> (DirectoryRegistration -> DirectoryRegistration -> Bool)
-> Eq DirectoryRegistration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DirectoryRegistration -> DirectoryRegistration -> Bool
== :: DirectoryRegistration -> DirectoryRegistration -> Bool
$c/= :: DirectoryRegistration -> DirectoryRegistration -> Bool
/= :: DirectoryRegistration -> DirectoryRegistration -> Bool
Prelude.Eq, Int -> DirectoryRegistration -> ShowS
[DirectoryRegistration] -> ShowS
DirectoryRegistration -> String
(Int -> DirectoryRegistration -> ShowS)
-> (DirectoryRegistration -> String)
-> ([DirectoryRegistration] -> ShowS)
-> Show DirectoryRegistration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DirectoryRegistration -> ShowS
showsPrec :: Int -> DirectoryRegistration -> ShowS
$cshow :: DirectoryRegistration -> String
show :: DirectoryRegistration -> String
$cshowList :: [DirectoryRegistration] -> ShowS
showList :: [DirectoryRegistration] -> ShowS
Prelude.Show)
mkDirectoryRegistration ::
  Value Prelude.Text -> DirectoryRegistration
mkDirectoryRegistration :: Value Text -> DirectoryRegistration
mkDirectoryRegistration Value Text
directoryId
  = DirectoryRegistration
      {haddock_workaround_ :: ()
haddock_workaround_ = (), directoryId :: Value Text
directoryId = Value Text
directoryId,
       tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DirectoryRegistration where
  toResourceProperties :: DirectoryRegistration -> ResourceProperties
toResourceProperties DirectoryRegistration {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: DirectoryRegistration -> ()
directoryId :: DirectoryRegistration -> Value Text
tags :: DirectoryRegistration -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
directoryId :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCAConnectorAD::DirectoryRegistration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"DirectoryId" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
directoryId]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Map Text (Value Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON DirectoryRegistration where
  toJSON :: DirectoryRegistration -> Value
toJSON DirectoryRegistration {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: DirectoryRegistration -> ()
directoryId :: DirectoryRegistration -> Value Text
tags :: DirectoryRegistration -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
directoryId :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"DirectoryId" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
directoryId]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Map Text (Value Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "DirectoryId" DirectoryRegistration where
  type PropertyType "DirectoryId" DirectoryRegistration = Value Prelude.Text
  set :: PropertyType "DirectoryId" DirectoryRegistration
-> DirectoryRegistration -> DirectoryRegistration
set PropertyType "DirectoryId" DirectoryRegistration
newValue DirectoryRegistration {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: DirectoryRegistration -> ()
directoryId :: DirectoryRegistration -> Value Text
tags :: DirectoryRegistration -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
directoryId :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = DirectoryRegistration {directoryId :: Value Text
directoryId = PropertyType "DirectoryId" DirectoryRegistration
Value Text
newValue, Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" DirectoryRegistration where
  type PropertyType "Tags" DirectoryRegistration = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" DirectoryRegistration
-> DirectoryRegistration -> DirectoryRegistration
set PropertyType "Tags" DirectoryRegistration
newValue DirectoryRegistration {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: DirectoryRegistration -> ()
directoryId :: DirectoryRegistration -> Value Text
tags :: DirectoryRegistration -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
directoryId :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = DirectoryRegistration {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" DirectoryRegistration
newValue, ()
Value Text
haddock_workaround_ :: ()
directoryId :: Value Text
haddock_workaround_ :: ()
directoryId :: Value Text
..}