module Stratosphere.PCAConnectorSCEP.Challenge (
        Challenge(..), mkChallenge
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Challenge
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcaconnectorscep-challenge.html>
    Challenge {Challenge -> ()
haddock_workaround_ :: (),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcaconnectorscep-challenge.html#cfn-pcaconnectorscep-challenge-connectorarn>
               Challenge -> Value Text
connectorArn :: (Value Prelude.Text),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pcaconnectorscep-challenge.html#cfn-pcaconnectorscep-challenge-tags>
               Challenge -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (Challenge -> Challenge -> Bool
(Challenge -> Challenge -> Bool)
-> (Challenge -> Challenge -> Bool) -> Eq Challenge
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Challenge -> Challenge -> Bool
== :: Challenge -> Challenge -> Bool
$c/= :: Challenge -> Challenge -> Bool
/= :: Challenge -> Challenge -> Bool
Prelude.Eq, Int -> Challenge -> ShowS
[Challenge] -> ShowS
Challenge -> String
(Int -> Challenge -> ShowS)
-> (Challenge -> String)
-> ([Challenge] -> ShowS)
-> Show Challenge
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Challenge -> ShowS
showsPrec :: Int -> Challenge -> ShowS
$cshow :: Challenge -> String
show :: Challenge -> String
$cshowList :: [Challenge] -> ShowS
showList :: [Challenge] -> ShowS
Prelude.Show)
mkChallenge :: Value Prelude.Text -> Challenge
mkChallenge :: Value Text -> Challenge
mkChallenge Value Text
connectorArn
  = Challenge
      {haddock_workaround_ :: ()
haddock_workaround_ = (), connectorArn :: Value Text
connectorArn = Value Text
connectorArn,
       tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Challenge where
  toResourceProperties :: Challenge -> ResourceProperties
toResourceProperties Challenge {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Challenge -> ()
connectorArn :: Challenge -> Value Text
tags :: Challenge -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
connectorArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCAConnectorSCEP::Challenge",
         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
"ConnectorArn" 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
connectorArn]
                           ([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 Challenge where
  toJSON :: Challenge -> Value
toJSON Challenge {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Challenge -> ()
connectorArn :: Challenge -> Value Text
tags :: Challenge -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
connectorArn :: 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
"ConnectorArn" 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
connectorArn]
              ([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 "ConnectorArn" Challenge where
  type PropertyType "ConnectorArn" Challenge = Value Prelude.Text
  set :: PropertyType "ConnectorArn" Challenge -> Challenge -> Challenge
set PropertyType "ConnectorArn" Challenge
newValue Challenge {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Challenge -> ()
connectorArn :: Challenge -> Value Text
tags :: Challenge -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
connectorArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = Challenge {connectorArn :: Value Text
connectorArn = PropertyType "ConnectorArn" Challenge
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" Challenge where
  type PropertyType "Tags" Challenge = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" Challenge -> Challenge -> Challenge
set PropertyType "Tags" Challenge
newValue Challenge {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: Challenge -> ()
connectorArn :: Challenge -> Value Text
tags :: Challenge -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
connectorArn :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
    = Challenge {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" Challenge
newValue, ()
Value Text
haddock_workaround_ :: ()
connectorArn :: Value Text
haddock_workaround_ :: ()
connectorArn :: Value Text
..}