module Stratosphere.IoT.FleetMetric.AggregationTypeProperty (
        AggregationTypeProperty(..), mkAggregationTypeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AggregationTypeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-fleetmetric-aggregationtype.html>
    AggregationTypeProperty {AggregationTypeProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-fleetmetric-aggregationtype.html#cfn-iot-fleetmetric-aggregationtype-name>
                             AggregationTypeProperty -> Value Text
name :: (Value Prelude.Text),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-fleetmetric-aggregationtype.html#cfn-iot-fleetmetric-aggregationtype-values>
                             AggregationTypeProperty -> ValueList Text
values :: (ValueList Prelude.Text)}
  deriving stock (AggregationTypeProperty -> AggregationTypeProperty -> Bool
(AggregationTypeProperty -> AggregationTypeProperty -> Bool)
-> (AggregationTypeProperty -> AggregationTypeProperty -> Bool)
-> Eq AggregationTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AggregationTypeProperty -> AggregationTypeProperty -> Bool
== :: AggregationTypeProperty -> AggregationTypeProperty -> Bool
$c/= :: AggregationTypeProperty -> AggregationTypeProperty -> Bool
/= :: AggregationTypeProperty -> AggregationTypeProperty -> Bool
Prelude.Eq, Int -> AggregationTypeProperty -> ShowS
[AggregationTypeProperty] -> ShowS
AggregationTypeProperty -> String
(Int -> AggregationTypeProperty -> ShowS)
-> (AggregationTypeProperty -> String)
-> ([AggregationTypeProperty] -> ShowS)
-> Show AggregationTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AggregationTypeProperty -> ShowS
showsPrec :: Int -> AggregationTypeProperty -> ShowS
$cshow :: AggregationTypeProperty -> String
show :: AggregationTypeProperty -> String
$cshowList :: [AggregationTypeProperty] -> ShowS
showList :: [AggregationTypeProperty] -> ShowS
Prelude.Show)
mkAggregationTypeProperty ::
  Value Prelude.Text
  -> ValueList Prelude.Text -> AggregationTypeProperty
mkAggregationTypeProperty :: Value Text -> ValueList Text -> AggregationTypeProperty
mkAggregationTypeProperty Value Text
name ValueList Text
values
  = AggregationTypeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, values :: ValueList Text
values = ValueList Text
values}
instance ToResourceProperties AggregationTypeProperty where
  toResourceProperties :: AggregationTypeProperty -> ResourceProperties
toResourceProperties AggregationTypeProperty {()
ValueList Text
Value Text
haddock_workaround_ :: AggregationTypeProperty -> ()
name :: AggregationTypeProperty -> Value Text
values :: AggregationTypeProperty -> ValueList Text
haddock_workaround_ :: ()
name :: Value Text
values :: ValueList Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::FleetMetric.AggregationType",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"Name" 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
name, Key
"Values" 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
values]}
instance JSON.ToJSON AggregationTypeProperty where
  toJSON :: AggregationTypeProperty -> Value
toJSON AggregationTypeProperty {()
ValueList Text
Value Text
haddock_workaround_ :: AggregationTypeProperty -> ()
name :: AggregationTypeProperty -> Value Text
values :: AggregationTypeProperty -> ValueList Text
haddock_workaround_ :: ()
name :: Value Text
values :: ValueList Text
..}
    = [(Key, Value)] -> Value
JSON.object [Key
"Name" 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
name, Key
"Values" 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
values]
instance Property "Name" AggregationTypeProperty where
  type PropertyType "Name" AggregationTypeProperty = Value Prelude.Text
  set :: PropertyType "Name" AggregationTypeProperty
-> AggregationTypeProperty -> AggregationTypeProperty
set PropertyType "Name" AggregationTypeProperty
newValue AggregationTypeProperty {()
ValueList Text
Value Text
haddock_workaround_ :: AggregationTypeProperty -> ()
name :: AggregationTypeProperty -> Value Text
values :: AggregationTypeProperty -> ValueList Text
haddock_workaround_ :: ()
name :: Value Text
values :: ValueList Text
..}
    = AggregationTypeProperty {name :: Value Text
name = PropertyType "Name" AggregationTypeProperty
Value Text
newValue, ()
ValueList Text
haddock_workaround_ :: ()
values :: ValueList Text
haddock_workaround_ :: ()
values :: ValueList Text
..}
instance Property "Values" AggregationTypeProperty where
  type PropertyType "Values" AggregationTypeProperty = ValueList Prelude.Text
  set :: PropertyType "Values" AggregationTypeProperty
-> AggregationTypeProperty -> AggregationTypeProperty
set PropertyType "Values" AggregationTypeProperty
newValue AggregationTypeProperty {()
ValueList Text
Value Text
haddock_workaround_ :: AggregationTypeProperty -> ()
name :: AggregationTypeProperty -> Value Text
values :: AggregationTypeProperty -> ValueList Text
haddock_workaround_ :: ()
name :: Value Text
values :: ValueList Text
..}
    = AggregationTypeProperty {values :: ValueList Text
values = PropertyType "Values" AggregationTypeProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
haddock_workaround_ :: ()
name :: Value Text
..}