module Stratosphere.EC2.Instance.ElasticInferenceAcceleratorProperty (
        ElasticInferenceAcceleratorProperty(..),
        mkElasticInferenceAcceleratorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ElasticInferenceAcceleratorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticinferenceaccelerator.html>
    ElasticInferenceAcceleratorProperty {ElasticInferenceAcceleratorProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticinferenceaccelerator.html#cfn-ec2-instance-elasticinferenceaccelerator-count>
                                         ElasticInferenceAcceleratorProperty -> Maybe (Value Integer)
count :: (Prelude.Maybe (Value Prelude.Integer)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticinferenceaccelerator.html#cfn-ec2-instance-elasticinferenceaccelerator-type>
                                         ElasticInferenceAcceleratorProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty -> Bool
(ElasticInferenceAcceleratorProperty
 -> ElasticInferenceAcceleratorProperty -> Bool)
-> (ElasticInferenceAcceleratorProperty
    -> ElasticInferenceAcceleratorProperty -> Bool)
-> Eq ElasticInferenceAcceleratorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty -> Bool
== :: ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty -> Bool
$c/= :: ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty -> Bool
/= :: ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty -> Bool
Prelude.Eq, Int -> ElasticInferenceAcceleratorProperty -> ShowS
[ElasticInferenceAcceleratorProperty] -> ShowS
ElasticInferenceAcceleratorProperty -> String
(Int -> ElasticInferenceAcceleratorProperty -> ShowS)
-> (ElasticInferenceAcceleratorProperty -> String)
-> ([ElasticInferenceAcceleratorProperty] -> ShowS)
-> Show ElasticInferenceAcceleratorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ElasticInferenceAcceleratorProperty -> ShowS
showsPrec :: Int -> ElasticInferenceAcceleratorProperty -> ShowS
$cshow :: ElasticInferenceAcceleratorProperty -> String
show :: ElasticInferenceAcceleratorProperty -> String
$cshowList :: [ElasticInferenceAcceleratorProperty] -> ShowS
showList :: [ElasticInferenceAcceleratorProperty] -> ShowS
Prelude.Show)
mkElasticInferenceAcceleratorProperty ::
  Value Prelude.Text -> ElasticInferenceAcceleratorProperty
mkElasticInferenceAcceleratorProperty :: Value Text -> ElasticInferenceAcceleratorProperty
mkElasticInferenceAcceleratorProperty Value Text
type'
  = ElasticInferenceAcceleratorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type', count :: Maybe (Value Integer)
count = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ElasticInferenceAcceleratorProperty where
  toResourceProperties :: ElasticInferenceAcceleratorProperty -> ResourceProperties
toResourceProperties ElasticInferenceAcceleratorProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ElasticInferenceAcceleratorProperty -> ()
count :: ElasticInferenceAcceleratorProperty -> Maybe (Value Integer)
type' :: ElasticInferenceAcceleratorProperty -> Value Text
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::Instance.ElasticInferenceAccelerator",
         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
"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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Count" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
count]))}
instance JSON.ToJSON ElasticInferenceAcceleratorProperty where
  toJSON :: ElasticInferenceAcceleratorProperty -> Value
toJSON ElasticInferenceAcceleratorProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ElasticInferenceAcceleratorProperty -> ()
count :: ElasticInferenceAcceleratorProperty -> Maybe (Value Integer)
type' :: ElasticInferenceAcceleratorProperty -> Value Text
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
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
"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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Count" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
count])))
instance Property "Count" ElasticInferenceAcceleratorProperty where
  type PropertyType "Count" ElasticInferenceAcceleratorProperty = Value Prelude.Integer
  set :: PropertyType "Count" ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty
set PropertyType "Count" ElasticInferenceAcceleratorProperty
newValue ElasticInferenceAcceleratorProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ElasticInferenceAcceleratorProperty -> ()
count :: ElasticInferenceAcceleratorProperty -> Maybe (Value Integer)
type' :: ElasticInferenceAcceleratorProperty -> Value Text
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
type' :: Value Text
..}
    = ElasticInferenceAcceleratorProperty
        {count :: Maybe (Value Integer)
count = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Count" ElasticInferenceAcceleratorProperty
Value Integer
newValue, ()
Value Text
haddock_workaround_ :: ()
type' :: Value Text
haddock_workaround_ :: ()
type' :: Value Text
..}
instance Property "Type" ElasticInferenceAcceleratorProperty where
  type PropertyType "Type" ElasticInferenceAcceleratorProperty = Value Prelude.Text
  set :: PropertyType "Type" ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty
-> ElasticInferenceAcceleratorProperty
set PropertyType "Type" ElasticInferenceAcceleratorProperty
newValue ElasticInferenceAcceleratorProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ElasticInferenceAcceleratorProperty -> ()
count :: ElasticInferenceAcceleratorProperty -> Maybe (Value Integer)
type' :: ElasticInferenceAcceleratorProperty -> Value Text
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
type' :: Value Text
..}
    = ElasticInferenceAcceleratorProperty {type' :: Value Text
type' = PropertyType "Type" ElasticInferenceAcceleratorProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
haddock_workaround_ :: ()
count :: Maybe (Value Integer)
..}