module Stratosphere.Greengrass.DeviceDefinitionVersion.DeviceProperty (
DeviceProperty(..), mkDeviceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeviceProperty
=
DeviceProperty {DeviceProperty -> ()
haddock_workaround_ :: (),
DeviceProperty -> Value Text
certificateArn :: (Value Prelude.Text),
DeviceProperty -> Value Text
id :: (Value Prelude.Text),
DeviceProperty -> Maybe (Value Bool)
syncShadow :: (Prelude.Maybe (Value Prelude.Bool)),
DeviceProperty -> Value Text
thingArn :: (Value Prelude.Text)}
deriving stock (DeviceProperty -> DeviceProperty -> Bool
(DeviceProperty -> DeviceProperty -> Bool)
-> (DeviceProperty -> DeviceProperty -> Bool) -> Eq DeviceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceProperty -> DeviceProperty -> Bool
== :: DeviceProperty -> DeviceProperty -> Bool
$c/= :: DeviceProperty -> DeviceProperty -> Bool
/= :: DeviceProperty -> DeviceProperty -> Bool
Prelude.Eq, Int -> DeviceProperty -> ShowS
[DeviceProperty] -> ShowS
DeviceProperty -> String
(Int -> DeviceProperty -> ShowS)
-> (DeviceProperty -> String)
-> ([DeviceProperty] -> ShowS)
-> Show DeviceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeviceProperty -> ShowS
showsPrec :: Int -> DeviceProperty -> ShowS
$cshow :: DeviceProperty -> String
show :: DeviceProperty -> String
$cshowList :: [DeviceProperty] -> ShowS
showList :: [DeviceProperty] -> ShowS
Prelude.Show)
mkDeviceProperty ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> DeviceProperty
mkDeviceProperty :: Value Text -> Value Text -> Value Text -> DeviceProperty
mkDeviceProperty Value Text
certificateArn Value Text
id Value Text
thingArn
= DeviceProperty
{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 DeviceProperty where
toResourceProperties :: DeviceProperty -> ResourceProperties
toResourceProperties DeviceProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
certificateArn :: DeviceProperty -> Value Text
id :: DeviceProperty -> Value Text
syncShadow :: DeviceProperty -> Maybe (Value Bool)
thingArn :: DeviceProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Greengrass::DeviceDefinitionVersion.Device",
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 DeviceProperty where
toJSON :: DeviceProperty -> Value
toJSON DeviceProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
certificateArn :: DeviceProperty -> Value Text
id :: DeviceProperty -> Value Text
syncShadow :: DeviceProperty -> Maybe (Value Bool)
thingArn :: DeviceProperty -> 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" DeviceProperty where
type PropertyType "CertificateArn" DeviceProperty = Value Prelude.Text
set :: PropertyType "CertificateArn" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "CertificateArn" DeviceProperty
newValue DeviceProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
certificateArn :: DeviceProperty -> Value Text
id :: DeviceProperty -> Value Text
syncShadow :: DeviceProperty -> Maybe (Value Bool)
thingArn :: DeviceProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
= DeviceProperty {certificateArn :: Value Text
certificateArn = PropertyType "CertificateArn" DeviceProperty
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" DeviceProperty where
type PropertyType "Id" DeviceProperty = Value Prelude.Text
set :: PropertyType "Id" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "Id" DeviceProperty
newValue DeviceProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
certificateArn :: DeviceProperty -> Value Text
id :: DeviceProperty -> Value Text
syncShadow :: DeviceProperty -> Maybe (Value Bool)
thingArn :: DeviceProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
= DeviceProperty {id :: Value Text
id = PropertyType "Id" DeviceProperty
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" DeviceProperty where
type PropertyType "SyncShadow" DeviceProperty = Value Prelude.Bool
set :: PropertyType "SyncShadow" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "SyncShadow" DeviceProperty
newValue DeviceProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
certificateArn :: DeviceProperty -> Value Text
id :: DeviceProperty -> Value Text
syncShadow :: DeviceProperty -> Maybe (Value Bool)
thingArn :: DeviceProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
= DeviceProperty {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" DeviceProperty
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" DeviceProperty where
type PropertyType "ThingArn" DeviceProperty = Value Prelude.Text
set :: PropertyType "ThingArn" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "ThingArn" DeviceProperty
newValue DeviceProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
certificateArn :: DeviceProperty -> Value Text
id :: DeviceProperty -> Value Text
syncShadow :: DeviceProperty -> Maybe (Value Bool)
thingArn :: DeviceProperty -> Value Text
haddock_workaround_ :: ()
certificateArn :: Value Text
id :: Value Text
syncShadow :: Maybe (Value Bool)
thingArn :: Value Text
..}
= DeviceProperty {thingArn :: Value Text
thingArn = PropertyType "ThingArn" DeviceProperty
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)
..}