module Stratosphere.IoT.Dimension (
        Dimension(..), mkDimension
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Dimension
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-dimension.html>
    Dimension {Dimension -> ()
haddock_workaround_ :: (),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-dimension.html#cfn-iot-dimension-name>
               Dimension -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-dimension.html#cfn-iot-dimension-stringvalues>
               Dimension -> ValueList Text
stringValues :: (ValueList Prelude.Text),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-dimension.html#cfn-iot-dimension-tags>
               Dimension -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-dimension.html#cfn-iot-dimension-type>
               Dimension -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (Dimension -> Dimension -> Bool
(Dimension -> Dimension -> Bool)
-> (Dimension -> Dimension -> Bool) -> Eq Dimension
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Dimension -> Dimension -> Bool
== :: Dimension -> Dimension -> Bool
$c/= :: Dimension -> Dimension -> Bool
/= :: Dimension -> Dimension -> Bool
Prelude.Eq, Int -> Dimension -> ShowS
[Dimension] -> ShowS
Dimension -> String
(Int -> Dimension -> ShowS)
-> (Dimension -> String)
-> ([Dimension] -> ShowS)
-> Show Dimension
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Dimension -> ShowS
showsPrec :: Int -> Dimension -> ShowS
$cshow :: Dimension -> String
show :: Dimension -> String
$cshowList :: [Dimension] -> ShowS
showList :: [Dimension] -> ShowS
Prelude.Show)
mkDimension ::
  ValueList Prelude.Text -> Value Prelude.Text -> Dimension
mkDimension :: ValueList Text -> Value Text -> Dimension
mkDimension ValueList Text
stringValues Value Text
type'
  = Dimension
      {haddock_workaround_ :: ()
haddock_workaround_ = (), stringValues :: ValueList Text
stringValues = ValueList Text
stringValues,
       type' :: Value Text
type' = Value Text
type', name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Dimension where
  toResourceProperties :: Dimension -> ResourceProperties
toResourceProperties Dimension {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: Dimension -> ()
name :: Dimension -> Maybe (Value Text)
stringValues :: Dimension -> ValueList Text
tags :: Dimension -> Maybe [Tag]
type' :: Dimension -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::Dimension", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"StringValues" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
stringValues, Key
"Type" 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
type']
                           ([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
"Name" (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)
name,
                               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]))}
instance JSON.ToJSON Dimension where
  toJSON :: Dimension -> Value
toJSON Dimension {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: Dimension -> ()
name :: Dimension -> Maybe (Value Text)
stringValues :: Dimension -> ValueList Text
tags :: Dimension -> Maybe [Tag]
type' :: Dimension -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: 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
"StringValues" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
stringValues, Key
"Type" 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
type']
              ([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
"Name" (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)
name,
                  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])))
instance Property "Name" Dimension where
  type PropertyType "Name" Dimension = Value Prelude.Text
  set :: PropertyType "Name" Dimension -> Dimension -> Dimension
set PropertyType "Name" Dimension
newValue Dimension {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: Dimension -> ()
name :: Dimension -> Maybe (Value Text)
stringValues :: Dimension -> ValueList Text
tags :: Dimension -> Maybe [Tag]
type' :: Dimension -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
..}
    = Dimension {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" Dimension
Value Text
newValue, Maybe [Tag]
()
ValueList Text
Value Text
haddock_workaround_ :: ()
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
haddock_workaround_ :: ()
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
..}
instance Property "StringValues" Dimension where
  type PropertyType "StringValues" Dimension = ValueList Prelude.Text
  set :: PropertyType "StringValues" Dimension -> Dimension -> Dimension
set PropertyType "StringValues" Dimension
newValue Dimension {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: Dimension -> ()
name :: Dimension -> Maybe (Value Text)
stringValues :: Dimension -> ValueList Text
tags :: Dimension -> Maybe [Tag]
type' :: Dimension -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
..}
    = Dimension {stringValues :: ValueList Text
stringValues = PropertyType "StringValues" Dimension
ValueList Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Value Text
..}
instance Property "Tags" Dimension where
  type PropertyType "Tags" Dimension = [Tag]
  set :: PropertyType "Tags" Dimension -> Dimension -> Dimension
set PropertyType "Tags" Dimension
newValue Dimension {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: Dimension -> ()
name :: Dimension -> Maybe (Value Text)
stringValues :: Dimension -> ValueList Text
tags :: Dimension -> Maybe [Tag]
type' :: Dimension -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
..}
    = Dimension {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" Dimension
newValue, Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
type' :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
type' :: Value Text
..}
instance Property "Type" Dimension where
  type PropertyType "Type" Dimension = Value Prelude.Text
  set :: PropertyType "Type" Dimension -> Dimension -> Dimension
set PropertyType "Type" Dimension
newValue Dimension {Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: Dimension -> ()
name :: Dimension -> Maybe (Value Text)
stringValues :: Dimension -> ValueList Text
tags :: Dimension -> Maybe [Tag]
type' :: Dimension -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
type' :: Value Text
..} = Dimension {type' :: Value Text
type' = PropertyType "Type" Dimension
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
stringValues :: ValueList Text
tags :: Maybe [Tag]
..}