module Stratosphere.ECS.TaskDefinition.PortMappingProperty (
PortMappingProperty(..), mkPortMappingProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PortMappingProperty
=
PortMappingProperty {PortMappingProperty -> ()
haddock_workaround_ :: (),
PortMappingProperty -> Maybe (Value Text)
appProtocol :: (Prelude.Maybe (Value Prelude.Text)),
PortMappingProperty -> Maybe (Value Integer)
containerPort :: (Prelude.Maybe (Value Prelude.Integer)),
PortMappingProperty -> Maybe (Value Text)
containerPortRange :: (Prelude.Maybe (Value Prelude.Text)),
PortMappingProperty -> Maybe (Value Integer)
hostPort :: (Prelude.Maybe (Value Prelude.Integer)),
PortMappingProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
PortMappingProperty -> Maybe (Value Text)
protocol :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (PortMappingProperty -> PortMappingProperty -> Bool
(PortMappingProperty -> PortMappingProperty -> Bool)
-> (PortMappingProperty -> PortMappingProperty -> Bool)
-> Eq PortMappingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PortMappingProperty -> PortMappingProperty -> Bool
== :: PortMappingProperty -> PortMappingProperty -> Bool
$c/= :: PortMappingProperty -> PortMappingProperty -> Bool
/= :: PortMappingProperty -> PortMappingProperty -> Bool
Prelude.Eq, Int -> PortMappingProperty -> ShowS
[PortMappingProperty] -> ShowS
PortMappingProperty -> String
(Int -> PortMappingProperty -> ShowS)
-> (PortMappingProperty -> String)
-> ([PortMappingProperty] -> ShowS)
-> Show PortMappingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PortMappingProperty -> ShowS
showsPrec :: Int -> PortMappingProperty -> ShowS
$cshow :: PortMappingProperty -> String
show :: PortMappingProperty -> String
$cshowList :: [PortMappingProperty] -> ShowS
showList :: [PortMappingProperty] -> ShowS
Prelude.Show)
mkPortMappingProperty :: PortMappingProperty
mkPortMappingProperty :: PortMappingProperty
mkPortMappingProperty
= PortMappingProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), appProtocol :: Maybe (Value Text)
appProtocol = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
containerPort :: Maybe (Value Integer)
containerPort = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
containerPortRange :: Maybe (Value Text)
containerPortRange = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, hostPort :: Maybe (Value Integer)
hostPort = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, protocol :: Maybe (Value Text)
protocol = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PortMappingProperty where
toResourceProperties :: PortMappingProperty -> ResourceProperties
toResourceProperties PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ECS::TaskDefinition.PortMapping",
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 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
"AppProtocol" (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)
appProtocol,
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
"ContainerPort" (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)
containerPort,
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
"ContainerPortRange" (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)
containerPortRange,
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
"HostPort" (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)
hostPort,
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 -> 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
"Protocol" (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)
protocol])}
instance JSON.ToJSON PortMappingProperty where
toJSON :: PortMappingProperty -> Value
toJSON PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= [(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 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
"AppProtocol" (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)
appProtocol,
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
"ContainerPort" (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)
containerPort,
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
"ContainerPortRange" (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)
containerPortRange,
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
"HostPort" (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)
hostPort,
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 -> 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
"Protocol" (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)
protocol]))
instance Property "AppProtocol" PortMappingProperty where
type PropertyType "AppProtocol" PortMappingProperty = Value Prelude.Text
set :: PropertyType "AppProtocol" PortMappingProperty
-> PortMappingProperty -> PortMappingProperty
set PropertyType "AppProtocol" PortMappingProperty
newValue PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= PortMappingProperty {appProtocol :: Maybe (Value Text)
appProtocol = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AppProtocol" PortMappingProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
instance Property "ContainerPort" PortMappingProperty where
type PropertyType "ContainerPort" PortMappingProperty = Value Prelude.Integer
set :: PropertyType "ContainerPort" PortMappingProperty
-> PortMappingProperty -> PortMappingProperty
set PropertyType "ContainerPort" PortMappingProperty
newValue PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= PortMappingProperty {containerPort :: Maybe (Value Integer)
containerPort = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerPort" PortMappingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
instance Property "ContainerPortRange" PortMappingProperty where
type PropertyType "ContainerPortRange" PortMappingProperty = Value Prelude.Text
set :: PropertyType "ContainerPortRange" PortMappingProperty
-> PortMappingProperty -> PortMappingProperty
set PropertyType "ContainerPortRange" PortMappingProperty
newValue PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= PortMappingProperty
{containerPortRange :: Maybe (Value Text)
containerPortRange = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerPortRange" PortMappingProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
instance Property "HostPort" PortMappingProperty where
type PropertyType "HostPort" PortMappingProperty = Value Prelude.Integer
set :: PropertyType "HostPort" PortMappingProperty
-> PortMappingProperty -> PortMappingProperty
set PropertyType "HostPort" PortMappingProperty
newValue PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= PortMappingProperty {hostPort :: Maybe (Value Integer)
hostPort = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HostPort" PortMappingProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
instance Property "Name" PortMappingProperty where
type PropertyType "Name" PortMappingProperty = Value Prelude.Text
set :: PropertyType "Name" PortMappingProperty
-> PortMappingProperty -> PortMappingProperty
set PropertyType "Name" PortMappingProperty
newValue PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= PortMappingProperty {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" PortMappingProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
protocol :: Maybe (Value Text)
..}
instance Property "Protocol" PortMappingProperty where
type PropertyType "Protocol" PortMappingProperty = Value Prelude.Text
set :: PropertyType "Protocol" PortMappingProperty
-> PortMappingProperty -> PortMappingProperty
set PropertyType "Protocol" PortMappingProperty
newValue PortMappingProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PortMappingProperty -> ()
appProtocol :: PortMappingProperty -> Maybe (Value Text)
containerPort :: PortMappingProperty -> Maybe (Value Integer)
containerPortRange :: PortMappingProperty -> Maybe (Value Text)
hostPort :: PortMappingProperty -> Maybe (Value Integer)
name :: PortMappingProperty -> Maybe (Value Text)
protocol :: PortMappingProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
= PortMappingProperty {protocol :: Maybe (Value Text)
protocol = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Protocol" PortMappingProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
haddock_workaround_ :: ()
appProtocol :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
containerPortRange :: Maybe (Value Text)
hostPort :: Maybe (Value Integer)
name :: Maybe (Value Text)
..}