module Stratosphere.GreengrassV2.ComponentVersion.ComponentPlatformProperty (
        ComponentPlatformProperty(..), mkComponentPlatformProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ComponentPlatformProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentplatform.html>
    ComponentPlatformProperty {ComponentPlatformProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentplatform.html#cfn-greengrassv2-componentversion-componentplatform-attributes>
                               ComponentPlatformProperty -> Maybe (Map Text (Value Text))
attributes :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentplatform.html#cfn-greengrassv2-componentversion-componentplatform-name>
                               ComponentPlatformProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ComponentPlatformProperty -> ComponentPlatformProperty -> Bool
(ComponentPlatformProperty -> ComponentPlatformProperty -> Bool)
-> (ComponentPlatformProperty -> ComponentPlatformProperty -> Bool)
-> Eq ComponentPlatformProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComponentPlatformProperty -> ComponentPlatformProperty -> Bool
== :: ComponentPlatformProperty -> ComponentPlatformProperty -> Bool
$c/= :: ComponentPlatformProperty -> ComponentPlatformProperty -> Bool
/= :: ComponentPlatformProperty -> ComponentPlatformProperty -> Bool
Prelude.Eq, Int -> ComponentPlatformProperty -> ShowS
[ComponentPlatformProperty] -> ShowS
ComponentPlatformProperty -> String
(Int -> ComponentPlatformProperty -> ShowS)
-> (ComponentPlatformProperty -> String)
-> ([ComponentPlatformProperty] -> ShowS)
-> Show ComponentPlatformProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ComponentPlatformProperty -> ShowS
showsPrec :: Int -> ComponentPlatformProperty -> ShowS
$cshow :: ComponentPlatformProperty -> String
show :: ComponentPlatformProperty -> String
$cshowList :: [ComponentPlatformProperty] -> ShowS
showList :: [ComponentPlatformProperty] -> ShowS
Prelude.Show)
mkComponentPlatformProperty :: ComponentPlatformProperty
mkComponentPlatformProperty :: ComponentPlatformProperty
mkComponentPlatformProperty
  = ComponentPlatformProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), attributes :: Maybe (Map Text (Value Text))
attributes = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ComponentPlatformProperty where
  toResourceProperties :: ComponentPlatformProperty -> ResourceProperties
toResourceProperties ComponentPlatformProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ComponentPlatformProperty -> ()
attributes :: ComponentPlatformProperty -> Maybe (Map Text (Value Text))
name :: ComponentPlatformProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GreengrassV2::ComponentVersion.ComponentPlatform",
         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 -> 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
"Attributes" (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))
attributes,
                            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])}
instance JSON.ToJSON ComponentPlatformProperty where
  toJSON :: ComponentPlatformProperty -> Value
toJSON ComponentPlatformProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ComponentPlatformProperty -> ()
attributes :: ComponentPlatformProperty -> Maybe (Map Text (Value Text))
name :: ComponentPlatformProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
name :: 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 -> 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
"Attributes" (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))
attributes,
               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]))
instance Property "Attributes" ComponentPlatformProperty where
  type PropertyType "Attributes" ComponentPlatformProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Attributes" ComponentPlatformProperty
-> ComponentPlatformProperty -> ComponentPlatformProperty
set PropertyType "Attributes" ComponentPlatformProperty
newValue ComponentPlatformProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ComponentPlatformProperty -> ()
attributes :: ComponentPlatformProperty -> Maybe (Map Text (Value Text))
name :: ComponentPlatformProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
name :: Maybe (Value Text)
..}
    = ComponentPlatformProperty
        {attributes :: Maybe (Map Text (Value Text))
attributes = 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 "Attributes" ComponentPlatformProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" ComponentPlatformProperty where
  type PropertyType "Name" ComponentPlatformProperty = Value Prelude.Text
  set :: PropertyType "Name" ComponentPlatformProperty
-> ComponentPlatformProperty -> ComponentPlatformProperty
set PropertyType "Name" ComponentPlatformProperty
newValue ComponentPlatformProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ComponentPlatformProperty -> ()
attributes :: ComponentPlatformProperty -> Maybe (Map Text (Value Text))
name :: ComponentPlatformProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
name :: Maybe (Value Text)
..}
    = ComponentPlatformProperty {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" ComponentPlatformProperty
Value Text
newValue, Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
attributes :: Maybe (Map Text (Value Text))
..}