module Stratosphere.SSM.Document.DocumentRequiresProperty (
        DocumentRequiresProperty(..), mkDocumentRequiresProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DocumentRequiresProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-documentrequires.html>
    DocumentRequiresProperty {DocumentRequiresProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-documentrequires.html#cfn-ssm-document-documentrequires-name>
                              DocumentRequiresProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-document-documentrequires.html#cfn-ssm-document-documentrequires-version>
                              DocumentRequiresProperty -> Maybe (Value Text)
version :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (DocumentRequiresProperty -> DocumentRequiresProperty -> Bool
(DocumentRequiresProperty -> DocumentRequiresProperty -> Bool)
-> (DocumentRequiresProperty -> DocumentRequiresProperty -> Bool)
-> Eq DocumentRequiresProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentRequiresProperty -> DocumentRequiresProperty -> Bool
== :: DocumentRequiresProperty -> DocumentRequiresProperty -> Bool
$c/= :: DocumentRequiresProperty -> DocumentRequiresProperty -> Bool
/= :: DocumentRequiresProperty -> DocumentRequiresProperty -> Bool
Prelude.Eq, Int -> DocumentRequiresProperty -> ShowS
[DocumentRequiresProperty] -> ShowS
DocumentRequiresProperty -> String
(Int -> DocumentRequiresProperty -> ShowS)
-> (DocumentRequiresProperty -> String)
-> ([DocumentRequiresProperty] -> ShowS)
-> Show DocumentRequiresProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentRequiresProperty -> ShowS
showsPrec :: Int -> DocumentRequiresProperty -> ShowS
$cshow :: DocumentRequiresProperty -> String
show :: DocumentRequiresProperty -> String
$cshowList :: [DocumentRequiresProperty] -> ShowS
showList :: [DocumentRequiresProperty] -> ShowS
Prelude.Show)
mkDocumentRequiresProperty :: DocumentRequiresProperty
mkDocumentRequiresProperty :: DocumentRequiresProperty
mkDocumentRequiresProperty
  = DocumentRequiresProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       version :: Maybe (Value Text)
version = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DocumentRequiresProperty where
  toResourceProperties :: DocumentRequiresProperty -> ResourceProperties
toResourceProperties DocumentRequiresProperty {Maybe (Value Text)
()
haddock_workaround_ :: DocumentRequiresProperty -> ()
name :: DocumentRequiresProperty -> Maybe (Value Text)
version :: DocumentRequiresProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SSM::Document.DocumentRequires",
         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 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
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
                            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..=) Key
"Version" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
version])}
instance JSON.ToJSON DocumentRequiresProperty where
  toJSON :: DocumentRequiresProperty -> Value
toJSON DocumentRequiresProperty {Maybe (Value Text)
()
haddock_workaround_ :: DocumentRequiresProperty -> ()
name :: DocumentRequiresProperty -> Maybe (Value Text)
version :: DocumentRequiresProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = [(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 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
"Name" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
name,
               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..=) Key
"Version" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
version]))
instance Property "Name" DocumentRequiresProperty where
  type PropertyType "Name" DocumentRequiresProperty = Value Prelude.Text
  set :: PropertyType "Name" DocumentRequiresProperty
-> DocumentRequiresProperty -> DocumentRequiresProperty
set PropertyType "Name" DocumentRequiresProperty
newValue DocumentRequiresProperty {Maybe (Value Text)
()
haddock_workaround_ :: DocumentRequiresProperty -> ()
name :: DocumentRequiresProperty -> Maybe (Value Text)
version :: DocumentRequiresProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = DocumentRequiresProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" DocumentRequiresProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
version :: Maybe (Value Text)
haddock_workaround_ :: ()
version :: Maybe (Value Text)
..}
instance Property "Version" DocumentRequiresProperty where
  type PropertyType "Version" DocumentRequiresProperty = Value Prelude.Text
  set :: PropertyType "Version" DocumentRequiresProperty
-> DocumentRequiresProperty -> DocumentRequiresProperty
set PropertyType "Version" DocumentRequiresProperty
newValue DocumentRequiresProperty {Maybe (Value Text)
()
haddock_workaround_ :: DocumentRequiresProperty -> ()
name :: DocumentRequiresProperty -> Maybe (Value Text)
version :: DocumentRequiresProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
version :: Maybe (Value Text)
..}
    = DocumentRequiresProperty {version :: Maybe (Value Text)
version = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" DocumentRequiresProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}