module Stratosphere.SageMaker.Device.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
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-device-device.html>
    DeviceProperty {DeviceProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-device-device.html#cfn-sagemaker-device-device-description>
                    DeviceProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-device-device.html#cfn-sagemaker-device-device-devicename>
                    DeviceProperty -> Value Text
deviceName :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-device-device.html#cfn-sagemaker-device-device-iotthingname>
                    DeviceProperty -> Maybe (Value Text)
iotThingName :: (Prelude.Maybe (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 -> DeviceProperty
mkDeviceProperty :: Value Text -> DeviceProperty
mkDeviceProperty Value Text
deviceName
  = DeviceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), deviceName :: Value Text
deviceName = Value Text
deviceName,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, iotThingName :: Maybe (Value Text)
iotThingName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DeviceProperty where
  toResourceProperties :: DeviceProperty -> ResourceProperties
toResourceProperties DeviceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
description :: DeviceProperty -> Maybe (Value Text)
deviceName :: DeviceProperty -> Value Text
iotThingName :: DeviceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
iotThingName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::Device.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
"DeviceName" 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
deviceName]
                           ([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
"Description" (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)
description,
                               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
"IotThingName" (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)
iotThingName]))}
instance JSON.ToJSON DeviceProperty where
  toJSON :: DeviceProperty -> Value
toJSON DeviceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
description :: DeviceProperty -> Maybe (Value Text)
deviceName :: DeviceProperty -> Value Text
iotThingName :: DeviceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
iotThingName :: Maybe (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
"DeviceName" 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
deviceName]
              ([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
"Description" (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)
description,
                  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
"IotThingName" (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)
iotThingName])))
instance Property "Description" DeviceProperty where
  type PropertyType "Description" DeviceProperty = Value Prelude.Text
  set :: PropertyType "Description" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "Description" DeviceProperty
newValue DeviceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
description :: DeviceProperty -> Maybe (Value Text)
deviceName :: DeviceProperty -> Value Text
iotThingName :: DeviceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
iotThingName :: Maybe (Value Text)
..}
    = DeviceProperty {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" DeviceProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deviceName :: Value Text
iotThingName :: Maybe (Value Text)
haddock_workaround_ :: ()
deviceName :: Value Text
iotThingName :: Maybe (Value Text)
..}
instance Property "DeviceName" DeviceProperty where
  type PropertyType "DeviceName" DeviceProperty = Value Prelude.Text
  set :: PropertyType "DeviceName" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "DeviceName" DeviceProperty
newValue DeviceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
description :: DeviceProperty -> Maybe (Value Text)
deviceName :: DeviceProperty -> Value Text
iotThingName :: DeviceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
iotThingName :: Maybe (Value Text)
..}
    = DeviceProperty {deviceName :: Value Text
deviceName = PropertyType "DeviceName" DeviceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
iotThingName :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
iotThingName :: Maybe (Value Text)
..}
instance Property "IotThingName" DeviceProperty where
  type PropertyType "IotThingName" DeviceProperty = Value Prelude.Text
  set :: PropertyType "IotThingName" DeviceProperty
-> DeviceProperty -> DeviceProperty
set PropertyType "IotThingName" DeviceProperty
newValue DeviceProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: DeviceProperty -> ()
description :: DeviceProperty -> Maybe (Value Text)
deviceName :: DeviceProperty -> Value Text
iotThingName :: DeviceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
iotThingName :: Maybe (Value Text)
..}
    = DeviceProperty {iotThingName :: Maybe (Value Text)
iotThingName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IotThingName" DeviceProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
deviceName :: Value Text
..}