module Stratosphere.Greengrass.DeviceDefinitionVersion (
module Exports, DeviceDefinitionVersion(..),
mkDeviceDefinitionVersion
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Greengrass.DeviceDefinitionVersion.DeviceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeviceDefinitionVersion
=
DeviceDefinitionVersion {DeviceDefinitionVersion -> ()
haddock_workaround_ :: (),
DeviceDefinitionVersion -> Value Text
deviceDefinitionId :: (Value Prelude.Text),
DeviceDefinitionVersion -> [DeviceProperty]
devices :: [DeviceProperty]}
deriving stock (DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool
(DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool)
-> (DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool)
-> Eq DeviceDefinitionVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool
== :: DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool
$c/= :: DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool
/= :: DeviceDefinitionVersion -> DeviceDefinitionVersion -> Bool
Prelude.Eq, Int -> DeviceDefinitionVersion -> ShowS
[DeviceDefinitionVersion] -> ShowS
DeviceDefinitionVersion -> String
(Int -> DeviceDefinitionVersion -> ShowS)
-> (DeviceDefinitionVersion -> String)
-> ([DeviceDefinitionVersion] -> ShowS)
-> Show DeviceDefinitionVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeviceDefinitionVersion -> ShowS
showsPrec :: Int -> DeviceDefinitionVersion -> ShowS
$cshow :: DeviceDefinitionVersion -> String
show :: DeviceDefinitionVersion -> String
$cshowList :: [DeviceDefinitionVersion] -> ShowS
showList :: [DeviceDefinitionVersion] -> ShowS
Prelude.Show)
mkDeviceDefinitionVersion ::
Value Prelude.Text -> [DeviceProperty] -> DeviceDefinitionVersion
mkDeviceDefinitionVersion :: Value Text -> [DeviceProperty] -> DeviceDefinitionVersion
mkDeviceDefinitionVersion Value Text
deviceDefinitionId [DeviceProperty]
devices
= DeviceDefinitionVersion
{haddock_workaround_ :: ()
haddock_workaround_ = (), deviceDefinitionId :: Value Text
deviceDefinitionId = Value Text
deviceDefinitionId,
devices :: [DeviceProperty]
devices = [DeviceProperty]
devices}
instance ToResourceProperties DeviceDefinitionVersion where
toResourceProperties :: DeviceDefinitionVersion -> ResourceProperties
toResourceProperties DeviceDefinitionVersion {[DeviceProperty]
()
Value Text
haddock_workaround_ :: DeviceDefinitionVersion -> ()
deviceDefinitionId :: DeviceDefinitionVersion -> Value Text
devices :: DeviceDefinitionVersion -> [DeviceProperty]
haddock_workaround_ :: ()
deviceDefinitionId :: Value Text
devices :: [DeviceProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Greengrass::DeviceDefinitionVersion",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"DeviceDefinitionId" 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
deviceDefinitionId,
Key
"Devices" Key -> [DeviceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [DeviceProperty]
devices]}
instance JSON.ToJSON DeviceDefinitionVersion where
toJSON :: DeviceDefinitionVersion -> Value
toJSON DeviceDefinitionVersion {[DeviceProperty]
()
Value Text
haddock_workaround_ :: DeviceDefinitionVersion -> ()
deviceDefinitionId :: DeviceDefinitionVersion -> Value Text
devices :: DeviceDefinitionVersion -> [DeviceProperty]
haddock_workaround_ :: ()
deviceDefinitionId :: Value Text
devices :: [DeviceProperty]
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"DeviceDefinitionId" 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
deviceDefinitionId,
Key
"Devices" Key -> [DeviceProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [DeviceProperty]
devices]
instance Property "DeviceDefinitionId" DeviceDefinitionVersion where
type PropertyType "DeviceDefinitionId" DeviceDefinitionVersion = Value Prelude.Text
set :: PropertyType "DeviceDefinitionId" DeviceDefinitionVersion
-> DeviceDefinitionVersion -> DeviceDefinitionVersion
set PropertyType "DeviceDefinitionId" DeviceDefinitionVersion
newValue DeviceDefinitionVersion {[DeviceProperty]
()
Value Text
haddock_workaround_ :: DeviceDefinitionVersion -> ()
deviceDefinitionId :: DeviceDefinitionVersion -> Value Text
devices :: DeviceDefinitionVersion -> [DeviceProperty]
haddock_workaround_ :: ()
deviceDefinitionId :: Value Text
devices :: [DeviceProperty]
..}
= DeviceDefinitionVersion {deviceDefinitionId :: Value Text
deviceDefinitionId = PropertyType "DeviceDefinitionId" DeviceDefinitionVersion
Value Text
newValue, [DeviceProperty]
()
haddock_workaround_ :: ()
devices :: [DeviceProperty]
haddock_workaround_ :: ()
devices :: [DeviceProperty]
..}
instance Property "Devices" DeviceDefinitionVersion where
type PropertyType "Devices" DeviceDefinitionVersion = [DeviceProperty]
set :: PropertyType "Devices" DeviceDefinitionVersion
-> DeviceDefinitionVersion -> DeviceDefinitionVersion
set PropertyType "Devices" DeviceDefinitionVersion
newValue DeviceDefinitionVersion {[DeviceProperty]
()
Value Text
haddock_workaround_ :: DeviceDefinitionVersion -> ()
deviceDefinitionId :: DeviceDefinitionVersion -> Value Text
devices :: DeviceDefinitionVersion -> [DeviceProperty]
haddock_workaround_ :: ()
deviceDefinitionId :: Value Text
devices :: [DeviceProperty]
..}
= DeviceDefinitionVersion {devices :: [DeviceProperty]
devices = [DeviceProperty]
PropertyType "Devices" DeviceDefinitionVersion
newValue, ()
Value Text
haddock_workaround_ :: ()
deviceDefinitionId :: Value Text
haddock_workaround_ :: ()
deviceDefinitionId :: Value Text
..}