module Stratosphere.Greengrass.CoreDefinitionVersion.CoreProperty (
        CoreProperty(..), mkCoreProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CoreProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinitionversion-core.html>
    CoreProperty {CoreProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinitionversion-core.html#cfn-greengrass-coredefinitionversion-core-certificatearn>
                  CoreProperty -> Value Text
certificateArn :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinitionversion-core.html#cfn-greengrass-coredefinitionversion-core-id>
                  CoreProperty -> Value Text
id :: (Value Prelude.Text),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinitionversion-core.html#cfn-greengrass-coredefinitionversion-core-syncshadow>
                  CoreProperty -> Maybe (Value Bool)
syncShadow :: (Prelude.Maybe (Value Prelude.Bool)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-coredefinitionversion-core.html#cfn-greengrass-coredefinitionversion-core-thingarn>
                  CoreProperty -> Value Text
thingArn :: (Value Prelude.Text)}
  deriving stock (CoreProperty -> CoreProperty -> Bool
(CoreProperty -> CoreProperty -> Bool)
-> (CoreProperty -> CoreProperty -> Bool) -> Eq CoreProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CoreProperty -> CoreProperty -> Bool
== :: CoreProperty -> CoreProperty -> Bool
$c/= :: CoreProperty -> CoreProperty -> Bool
/= :: CoreProperty -> CoreProperty -> Bool
Prelude.Eq, Int -> CoreProperty -> ShowS
[CoreProperty] -> ShowS
CoreProperty -> String
(Int -> CoreProperty -> ShowS)
-> (CoreProperty -> String)
-> ([CoreProperty] -> ShowS)
-> Show CoreProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CoreProperty -> ShowS
showsPrec :: Int -> CoreProperty -> ShowS
$cshow :: CoreProperty -> String
show :: CoreProperty -> String
$cshowList :: [CoreProperty] -> ShowS
showList :: [CoreProperty] -> ShowS
Prelude.Show)
mkCoreProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> CoreProperty
mkCoreProperty :: Value Text -> Value Text -> Value Text -> CoreProperty
mkCoreProperty Value Text
certificateArn Value Text
id Value Text
thingArn
  = CoreProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), certificateArn :: Value Text
certificateArn = Value Text
certificateArn,
       id :: Value Text
id = Value Text
id, thingArn :: Value Text
thingArn = Value Text
thingArn, syncShadow :: Maybe (Value Bool)
syncShadow = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CoreProperty where
  toResourceProperties :: CoreProperty -> ResourceProperties
toResourceProperties CoreProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CoreProperty -> ()
certificateArn :: CoreProperty -> Value Text
id :: CoreProperty -> Value Text
syncShadow :: CoreProperty -> Maybe (Value Bool)
thingArn :: CoreProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Greengrass::CoreDefinitionVersion.Core",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"CertificateArn" 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
certificateArn, Key
"Id" 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
id,
                            Key
"ThingArn" 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
thingArn]
                           ([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
"SyncShadow" (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)
syncShadow]))}
instance JSON.ToJSON CoreProperty where
  toJSON :: CoreProperty -> Value
toJSON CoreProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CoreProperty -> ()
certificateArn :: CoreProperty -> Value Text
id :: CoreProperty -> Value Text
syncShadow :: CoreProperty -> Maybe (Value Bool)
thingArn :: CoreProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: 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
"CertificateArn" 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
certificateArn, Key
"Id" 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
id,
               Key
"ThingArn" 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
thingArn]
              ([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
"SyncShadow" (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)
syncShadow])))
instance Property "CertificateArn" CoreProperty where
  type PropertyType "CertificateArn" CoreProperty = Value Prelude.Text
  set :: PropertyType "CertificateArn" CoreProperty
-> CoreProperty -> CoreProperty
set PropertyType "CertificateArn" CoreProperty
newValue CoreProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CoreProperty -> ()
certificateArn :: CoreProperty -> Value Text
id :: CoreProperty -> Value Text
syncShadow :: CoreProperty -> Maybe (Value Bool)
thingArn :: CoreProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
    = CoreProperty {certificateArn :: Value Text
certificateArn = PropertyType "CertificateArn" CoreProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
haddock_workaround_ :: ()
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
instance Property "Id" CoreProperty where
  type PropertyType "Id" CoreProperty = Value Prelude.Text
  set :: PropertyType "Id" CoreProperty -> CoreProperty -> CoreProperty
set PropertyType "Id" CoreProperty
newValue CoreProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CoreProperty -> ()
certificateArn :: CoreProperty -> Value Text
id :: CoreProperty -> Value Text
syncShadow :: CoreProperty -> Maybe (Value Bool)
thingArn :: CoreProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..} = CoreProperty {id :: Value Text
id = PropertyType "Id" CoreProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
instance Property "SyncShadow" CoreProperty where
  type PropertyType "SyncShadow" CoreProperty = Value Prelude.Bool
  set :: PropertyType "SyncShadow" CoreProperty
-> CoreProperty -> CoreProperty
set PropertyType "SyncShadow" CoreProperty
newValue CoreProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CoreProperty -> ()
certificateArn :: CoreProperty -> Value Text
id :: CoreProperty -> Value Text
syncShadow :: CoreProperty -> Maybe (Value Bool)
thingArn :: CoreProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
    = CoreProperty {syncShadow :: Maybe (Value Bool)
syncShadow = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SyncShadow" CoreProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
thingArn :: Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
thingArn :: Value Text
..}
instance Property "ThingArn" CoreProperty where
  type PropertyType "ThingArn" CoreProperty = Value Prelude.Text
  set :: PropertyType "ThingArn" CoreProperty
-> CoreProperty -> CoreProperty
set PropertyType "ThingArn" CoreProperty
newValue CoreProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: CoreProperty -> ()
certificateArn :: CoreProperty -> Value Text
id :: CoreProperty -> Value Text
syncShadow :: CoreProperty -> Maybe (Value Bool)
thingArn :: CoreProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
    = CoreProperty {thingArn :: Value Text
thingArn = PropertyType "ThingArn" CoreProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
..}