module Stratosphere.EC2.NetworkInterface.ConnectionTrackingSpecificationProperty (
        ConnectionTrackingSpecificationProperty(..),
        mkConnectionTrackingSpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConnectionTrackingSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-connectiontrackingspecification.html>
    ConnectionTrackingSpecificationProperty {ConnectionTrackingSpecificationProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-connectiontrackingspecification.html#cfn-ec2-networkinterface-connectiontrackingspecification-tcpestablishedtimeout>
                                             ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
tcpEstablishedTimeout :: (Prelude.Maybe (Value Prelude.Integer)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-connectiontrackingspecification.html#cfn-ec2-networkinterface-connectiontrackingspecification-udpstreamtimeout>
                                             ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpStreamTimeout :: (Prelude.Maybe (Value Prelude.Integer)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinterface-connectiontrackingspecification.html#cfn-ec2-networkinterface-connectiontrackingspecification-udptimeout>
                                             ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpTimeout :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty -> Bool
(ConnectionTrackingSpecificationProperty
 -> ConnectionTrackingSpecificationProperty -> Bool)
-> (ConnectionTrackingSpecificationProperty
    -> ConnectionTrackingSpecificationProperty -> Bool)
-> Eq ConnectionTrackingSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty -> Bool
== :: ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty -> Bool
$c/= :: ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty -> Bool
/= :: ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty -> Bool
Prelude.Eq, Int -> ConnectionTrackingSpecificationProperty -> ShowS
[ConnectionTrackingSpecificationProperty] -> ShowS
ConnectionTrackingSpecificationProperty -> String
(Int -> ConnectionTrackingSpecificationProperty -> ShowS)
-> (ConnectionTrackingSpecificationProperty -> String)
-> ([ConnectionTrackingSpecificationProperty] -> ShowS)
-> Show ConnectionTrackingSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConnectionTrackingSpecificationProperty -> ShowS
showsPrec :: Int -> ConnectionTrackingSpecificationProperty -> ShowS
$cshow :: ConnectionTrackingSpecificationProperty -> String
show :: ConnectionTrackingSpecificationProperty -> String
$cshowList :: [ConnectionTrackingSpecificationProperty] -> ShowS
showList :: [ConnectionTrackingSpecificationProperty] -> ShowS
Prelude.Show)
mkConnectionTrackingSpecificationProperty ::
  ConnectionTrackingSpecificationProperty
mkConnectionTrackingSpecificationProperty :: ConnectionTrackingSpecificationProperty
mkConnectionTrackingSpecificationProperty
  = ConnectionTrackingSpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), tcpEstablishedTimeout :: Maybe (Value Integer)
tcpEstablishedTimeout = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       udpStreamTimeout :: Maybe (Value Integer)
udpStreamTimeout = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, udpTimeout :: Maybe (Value Integer)
udpTimeout = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConnectionTrackingSpecificationProperty where
  toResourceProperties :: ConnectionTrackingSpecificationProperty -> ResourceProperties
toResourceProperties ConnectionTrackingSpecificationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ConnectionTrackingSpecificationProperty -> ()
tcpEstablishedTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpStreamTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::NetworkInterface.ConnectionTrackingSpecification",
         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
"TcpEstablishedTimeout"
                              (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)
tcpEstablishedTimeout,
                            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
"UdpStreamTimeout" (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)
udpStreamTimeout,
                            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
"UdpTimeout" (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)
udpTimeout])}
instance JSON.ToJSON ConnectionTrackingSpecificationProperty where
  toJSON :: ConnectionTrackingSpecificationProperty -> Value
toJSON ConnectionTrackingSpecificationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ConnectionTrackingSpecificationProperty -> ()
tcpEstablishedTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpStreamTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: 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
"TcpEstablishedTimeout"
                 (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)
tcpEstablishedTimeout,
               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
"UdpStreamTimeout" (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)
udpStreamTimeout,
               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
"UdpTimeout" (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)
udpTimeout]))
instance Property "TcpEstablishedTimeout" ConnectionTrackingSpecificationProperty where
  type PropertyType "TcpEstablishedTimeout" ConnectionTrackingSpecificationProperty = Value Prelude.Integer
  set :: PropertyType
  "TcpEstablishedTimeout" ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty
set PropertyType
  "TcpEstablishedTimeout" ConnectionTrackingSpecificationProperty
newValue ConnectionTrackingSpecificationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ConnectionTrackingSpecificationProperty -> ()
tcpEstablishedTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpStreamTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
..}
    = ConnectionTrackingSpecificationProperty
        {tcpEstablishedTimeout :: Maybe (Value Integer)
tcpEstablishedTimeout = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TcpEstablishedTimeout" ConnectionTrackingSpecificationProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
haddock_workaround_ :: ()
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
..}
instance Property "UdpStreamTimeout" ConnectionTrackingSpecificationProperty where
  type PropertyType "UdpStreamTimeout" ConnectionTrackingSpecificationProperty = Value Prelude.Integer
  set :: PropertyType
  "UdpStreamTimeout" ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty
set PropertyType
  "UdpStreamTimeout" ConnectionTrackingSpecificationProperty
newValue ConnectionTrackingSpecificationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ConnectionTrackingSpecificationProperty -> ()
tcpEstablishedTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpStreamTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
..}
    = ConnectionTrackingSpecificationProperty
        {udpStreamTimeout :: Maybe (Value Integer)
udpStreamTimeout = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "UdpStreamTimeout" ConnectionTrackingSpecificationProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
..}
instance Property "UdpTimeout" ConnectionTrackingSpecificationProperty where
  type PropertyType "UdpTimeout" ConnectionTrackingSpecificationProperty = Value Prelude.Integer
  set :: PropertyType "UdpTimeout" ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty
-> ConnectionTrackingSpecificationProperty
set PropertyType "UdpTimeout" ConnectionTrackingSpecificationProperty
newValue ConnectionTrackingSpecificationProperty {Maybe (Value Integer)
()
haddock_workaround_ :: ConnectionTrackingSpecificationProperty -> ()
tcpEstablishedTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpStreamTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
udpTimeout :: ConnectionTrackingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
udpTimeout :: Maybe (Value Integer)
..}
    = ConnectionTrackingSpecificationProperty
        {udpTimeout :: Maybe (Value Integer)
udpTimeout = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UdpTimeout" ConnectionTrackingSpecificationProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
haddock_workaround_ :: ()
tcpEstablishedTimeout :: Maybe (Value Integer)
udpStreamTimeout :: Maybe (Value Integer)
..}