module Stratosphere.EC2.LaunchTemplate.NetworkInterfaceCountProperty (
        NetworkInterfaceCountProperty(..), mkNetworkInterfaceCountProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NetworkInterfaceCountProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterfacecount.html>
    NetworkInterfaceCountProperty {NetworkInterfaceCountProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterfacecount.html#cfn-ec2-launchtemplate-networkinterfacecount-max>
                                   NetworkInterfaceCountProperty -> Maybe (Value Integer)
max :: (Prelude.Maybe (Value Prelude.Integer)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-networkinterfacecount.html#cfn-ec2-launchtemplate-networkinterfacecount-min>
                                   NetworkInterfaceCountProperty -> Maybe (Value Integer)
min :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> Bool
(NetworkInterfaceCountProperty
 -> NetworkInterfaceCountProperty -> Bool)
-> (NetworkInterfaceCountProperty
    -> NetworkInterfaceCountProperty -> Bool)
-> Eq NetworkInterfaceCountProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> Bool
== :: NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> Bool
$c/= :: NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> Bool
/= :: NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> Bool
Prelude.Eq, Int -> NetworkInterfaceCountProperty -> ShowS
[NetworkInterfaceCountProperty] -> ShowS
NetworkInterfaceCountProperty -> String
(Int -> NetworkInterfaceCountProperty -> ShowS)
-> (NetworkInterfaceCountProperty -> String)
-> ([NetworkInterfaceCountProperty] -> ShowS)
-> Show NetworkInterfaceCountProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NetworkInterfaceCountProperty -> ShowS
showsPrec :: Int -> NetworkInterfaceCountProperty -> ShowS
$cshow :: NetworkInterfaceCountProperty -> String
show :: NetworkInterfaceCountProperty -> String
$cshowList :: [NetworkInterfaceCountProperty] -> ShowS
showList :: [NetworkInterfaceCountProperty] -> ShowS
Prelude.Show)
mkNetworkInterfaceCountProperty :: NetworkInterfaceCountProperty
mkNetworkInterfaceCountProperty :: NetworkInterfaceCountProperty
mkNetworkInterfaceCountProperty
  = NetworkInterfaceCountProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), max :: Maybe (Value Integer)
max = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       min :: Maybe (Value Integer)
min = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NetworkInterfaceCountProperty where
  toResourceProperties :: NetworkInterfaceCountProperty -> ResourceProperties
toResourceProperties NetworkInterfaceCountProperty {Maybe (Value Integer)
()
haddock_workaround_ :: NetworkInterfaceCountProperty -> ()
max :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
min :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.NetworkInterfaceCount",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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 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
"Max" (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)
max,
                            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
"Min" (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)
min])}
instance JSON.ToJSON NetworkInterfaceCountProperty where
  toJSON :: NetworkInterfaceCountProperty -> Value
toJSON NetworkInterfaceCountProperty {Maybe (Value Integer)
()
haddock_workaround_ :: NetworkInterfaceCountProperty -> ()
max :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
min :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = [(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 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
"Max" (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)
max,
               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
"Min" (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)
min]))
instance Property "Max" NetworkInterfaceCountProperty where
  type PropertyType "Max" NetworkInterfaceCountProperty = Value Prelude.Integer
  set :: PropertyType "Max" NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> NetworkInterfaceCountProperty
set PropertyType "Max" NetworkInterfaceCountProperty
newValue NetworkInterfaceCountProperty {Maybe (Value Integer)
()
haddock_workaround_ :: NetworkInterfaceCountProperty -> ()
max :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
min :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = NetworkInterfaceCountProperty {max :: Maybe (Value Integer)
max = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Max" NetworkInterfaceCountProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
min :: Maybe (Value Integer)
haddock_workaround_ :: ()
min :: Maybe (Value Integer)
..}
instance Property "Min" NetworkInterfaceCountProperty where
  type PropertyType "Min" NetworkInterfaceCountProperty = Value Prelude.Integer
  set :: PropertyType "Min" NetworkInterfaceCountProperty
-> NetworkInterfaceCountProperty -> NetworkInterfaceCountProperty
set PropertyType "Min" NetworkInterfaceCountProperty
newValue NetworkInterfaceCountProperty {Maybe (Value Integer)
()
haddock_workaround_ :: NetworkInterfaceCountProperty -> ()
max :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
min :: NetworkInterfaceCountProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = NetworkInterfaceCountProperty {min :: Maybe (Value Integer)
min = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Min" NetworkInterfaceCountProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
..}