module Stratosphere.IoT.ThingType (
        module Exports, ThingType(..), mkThingType
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.ThingType.ThingTypePropertiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ThingType
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingtype.html>
    ThingType {ThingType -> ()
haddock_workaround_ :: (),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingtype.html#cfn-iot-thingtype-deprecatethingtype>
               ThingType -> Maybe (Value Bool)
deprecateThingType :: (Prelude.Maybe (Value Prelude.Bool)),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingtype.html#cfn-iot-thingtype-tags>
               ThingType -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingtype.html#cfn-iot-thingtype-thingtypename>
               ThingType -> Maybe (Value Text)
thingTypeName :: (Prelude.Maybe (Value Prelude.Text)),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-thingtype.html#cfn-iot-thingtype-thingtypeproperties>
               ThingType -> Maybe ThingTypePropertiesProperty
thingTypeProperties :: (Prelude.Maybe ThingTypePropertiesProperty)}
  deriving stock (ThingType -> ThingType -> Bool
(ThingType -> ThingType -> Bool)
-> (ThingType -> ThingType -> Bool) -> Eq ThingType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ThingType -> ThingType -> Bool
== :: ThingType -> ThingType -> Bool
$c/= :: ThingType -> ThingType -> Bool
/= :: ThingType -> ThingType -> Bool
Prelude.Eq, Int -> ThingType -> ShowS
[ThingType] -> ShowS
ThingType -> String
(Int -> ThingType -> ShowS)
-> (ThingType -> String)
-> ([ThingType] -> ShowS)
-> Show ThingType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ThingType -> ShowS
showsPrec :: Int -> ThingType -> ShowS
$cshow :: ThingType -> String
show :: ThingType -> String
$cshowList :: [ThingType] -> ShowS
showList :: [ThingType] -> ShowS
Prelude.Show)
mkThingType :: ThingType
mkThingType :: ThingType
mkThingType
  = ThingType
      {haddock_workaround_ :: ()
haddock_workaround_ = (), deprecateThingType :: Maybe (Value Bool)
deprecateThingType = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing, thingTypeName :: Maybe (Value Text)
thingTypeName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       thingTypeProperties :: Maybe ThingTypePropertiesProperty
thingTypeProperties = Maybe ThingTypePropertiesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ThingType where
  toResourceProperties :: ThingType -> ResourceProperties
toResourceProperties ThingType {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ThingType -> ()
deprecateThingType :: ThingType -> Maybe (Value Bool)
tags :: ThingType -> Maybe [Tag]
thingTypeName :: ThingType -> Maybe (Value Text)
thingTypeProperties :: ThingType -> Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::ThingType", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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 -> 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
"DeprecateThingType" (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)
deprecateThingType,
                            Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                            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
"ThingTypeName" (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)
thingTypeName,
                            Key -> ThingTypePropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThingTypeProperties" (ThingTypePropertiesProperty -> (Key, Value))
-> Maybe ThingTypePropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThingTypePropertiesProperty
thingTypeProperties])}
instance JSON.ToJSON ThingType where
  toJSON :: ThingType -> Value
toJSON ThingType {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ThingType -> ()
deprecateThingType :: ThingType -> Maybe (Value Bool)
tags :: ThingType -> Maybe [Tag]
thingTypeName :: ThingType -> Maybe (Value Text)
thingTypeProperties :: ThingType -> Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
    = [(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 -> 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
"DeprecateThingType" (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)
deprecateThingType,
               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
               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
"ThingTypeName" (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)
thingTypeName,
               Key -> ThingTypePropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ThingTypeProperties" (ThingTypePropertiesProperty -> (Key, Value))
-> Maybe ThingTypePropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThingTypePropertiesProperty
thingTypeProperties]))
instance Property "DeprecateThingType" ThingType where
  type PropertyType "DeprecateThingType" ThingType = Value Prelude.Bool
  set :: PropertyType "DeprecateThingType" ThingType
-> ThingType -> ThingType
set PropertyType "DeprecateThingType" ThingType
newValue ThingType {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ThingType -> ()
deprecateThingType :: ThingType -> Maybe (Value Bool)
tags :: ThingType -> Maybe [Tag]
thingTypeName :: ThingType -> Maybe (Value Text)
thingTypeProperties :: ThingType -> Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
    = ThingType {deprecateThingType :: Maybe (Value Bool)
deprecateThingType = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeprecateThingType" ThingType
Value Bool
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
instance Property "Tags" ThingType where
  type PropertyType "Tags" ThingType = [Tag]
  set :: PropertyType "Tags" ThingType -> ThingType -> ThingType
set PropertyType "Tags" ThingType
newValue ThingType {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ThingType -> ()
deprecateThingType :: ThingType -> Maybe (Value Bool)
tags :: ThingType -> Maybe [Tag]
thingTypeName :: ThingType -> Maybe (Value Text)
thingTypeProperties :: ThingType -> Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
    = ThingType {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ThingType
newValue, Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
instance Property "ThingTypeName" ThingType where
  type PropertyType "ThingTypeName" ThingType = Value Prelude.Text
  set :: PropertyType "ThingTypeName" ThingType -> ThingType -> ThingType
set PropertyType "ThingTypeName" ThingType
newValue ThingType {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ThingType -> ()
deprecateThingType :: ThingType -> Maybe (Value Bool)
tags :: ThingType -> Maybe [Tag]
thingTypeName :: ThingType -> Maybe (Value Text)
thingTypeProperties :: ThingType -> Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
    = ThingType {thingTypeName :: Maybe (Value Text)
thingTypeName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThingTypeName" ThingType
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeProperties :: Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
instance Property "ThingTypeProperties" ThingType where
  type PropertyType "ThingTypeProperties" ThingType = ThingTypePropertiesProperty
  set :: PropertyType "ThingTypeProperties" ThingType
-> ThingType -> ThingType
set PropertyType "ThingTypeProperties" ThingType
newValue ThingType {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ThingTypePropertiesProperty
()
haddock_workaround_ :: ThingType -> ()
deprecateThingType :: ThingType -> Maybe (Value Bool)
tags :: ThingType -> Maybe [Tag]
thingTypeName :: ThingType -> Maybe (Value Text)
thingTypeProperties :: ThingType -> Maybe ThingTypePropertiesProperty
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
thingTypeProperties :: Maybe ThingTypePropertiesProperty
..}
    = ThingType {thingTypeProperties :: Maybe ThingTypePropertiesProperty
thingTypeProperties = ThingTypePropertiesProperty -> Maybe ThingTypePropertiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ThingTypeProperties" ThingType
ThingTypePropertiesProperty
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
haddock_workaround_ :: ()
deprecateThingType :: Maybe (Value Bool)
tags :: Maybe [Tag]
thingTypeName :: Maybe (Value Text)
..}