module Stratosphere.ECS.Service.AwsVpcConfigurationProperty (
        AwsVpcConfigurationProperty(..), mkAwsVpcConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AwsVpcConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html>
    AwsVpcConfigurationProperty {AwsVpcConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html#cfn-ecs-service-awsvpcconfiguration-assignpublicip>
                                 AwsVpcConfigurationProperty -> Maybe (Value Text)
assignPublicIp :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html#cfn-ecs-service-awsvpcconfiguration-securitygroups>
                                 AwsVpcConfigurationProperty -> Maybe (ValueList Text)
securityGroups :: (Prelude.Maybe (ValueList Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html#cfn-ecs-service-awsvpcconfiguration-subnets>
                                 AwsVpcConfigurationProperty -> Maybe (ValueList Text)
subnets :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty -> Bool
(AwsVpcConfigurationProperty
 -> AwsVpcConfigurationProperty -> Bool)
-> (AwsVpcConfigurationProperty
    -> AwsVpcConfigurationProperty -> Bool)
-> Eq AwsVpcConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty -> Bool
== :: AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty -> Bool
$c/= :: AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty -> Bool
/= :: AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty -> Bool
Prelude.Eq, Int -> AwsVpcConfigurationProperty -> ShowS
[AwsVpcConfigurationProperty] -> ShowS
AwsVpcConfigurationProperty -> String
(Int -> AwsVpcConfigurationProperty -> ShowS)
-> (AwsVpcConfigurationProperty -> String)
-> ([AwsVpcConfigurationProperty] -> ShowS)
-> Show AwsVpcConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AwsVpcConfigurationProperty -> ShowS
showsPrec :: Int -> AwsVpcConfigurationProperty -> ShowS
$cshow :: AwsVpcConfigurationProperty -> String
show :: AwsVpcConfigurationProperty -> String
$cshowList :: [AwsVpcConfigurationProperty] -> ShowS
showList :: [AwsVpcConfigurationProperty] -> ShowS
Prelude.Show)
mkAwsVpcConfigurationProperty :: AwsVpcConfigurationProperty
mkAwsVpcConfigurationProperty :: AwsVpcConfigurationProperty
mkAwsVpcConfigurationProperty
  = AwsVpcConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), assignPublicIp :: Maybe (Value Text)
assignPublicIp = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       securityGroups :: Maybe (ValueList Text)
securityGroups = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, subnets :: Maybe (ValueList Text)
subnets = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AwsVpcConfigurationProperty where
  toResourceProperties :: AwsVpcConfigurationProperty -> ResourceProperties
toResourceProperties AwsVpcConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AwsVpcConfigurationProperty -> ()
assignPublicIp :: AwsVpcConfigurationProperty -> Maybe (Value Text)
securityGroups :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
subnets :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::Service.AwsVpcConfiguration",
         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
"AssignPublicIp" (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)
assignPublicIp,
                            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..=) Key
"SecurityGroups" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
securityGroups,
                            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..=) Key
"Subnets" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnets])}
instance JSON.ToJSON AwsVpcConfigurationProperty where
  toJSON :: AwsVpcConfigurationProperty -> Value
toJSON AwsVpcConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AwsVpcConfigurationProperty -> ()
assignPublicIp :: AwsVpcConfigurationProperty -> Maybe (Value Text)
securityGroups :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
subnets :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList 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
"AssignPublicIp" (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)
assignPublicIp,
               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..=) Key
"SecurityGroups" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
securityGroups,
               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..=) Key
"Subnets" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnets]))
instance Property "AssignPublicIp" AwsVpcConfigurationProperty where
  type PropertyType "AssignPublicIp" AwsVpcConfigurationProperty = Value Prelude.Text
  set :: PropertyType "AssignPublicIp" AwsVpcConfigurationProperty
-> AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty
set PropertyType "AssignPublicIp" AwsVpcConfigurationProperty
newValue AwsVpcConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AwsVpcConfigurationProperty -> ()
assignPublicIp :: AwsVpcConfigurationProperty -> Maybe (Value Text)
securityGroups :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
subnets :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList Text)
..}
    = AwsVpcConfigurationProperty
        {assignPublicIp :: Maybe (Value Text)
assignPublicIp = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AssignPublicIp" AwsVpcConfigurationProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList Text)
..}
instance Property "SecurityGroups" AwsVpcConfigurationProperty where
  type PropertyType "SecurityGroups" AwsVpcConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "SecurityGroups" AwsVpcConfigurationProperty
-> AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty
set PropertyType "SecurityGroups" AwsVpcConfigurationProperty
newValue AwsVpcConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AwsVpcConfigurationProperty -> ()
assignPublicIp :: AwsVpcConfigurationProperty -> Maybe (Value Text)
securityGroups :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
subnets :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList Text)
..}
    = AwsVpcConfigurationProperty
        {securityGroups :: Maybe (ValueList Text)
securityGroups = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityGroups" AwsVpcConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
subnets :: Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
subnets :: Maybe (ValueList Text)
..}
instance Property "Subnets" AwsVpcConfigurationProperty where
  type PropertyType "Subnets" AwsVpcConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "Subnets" AwsVpcConfigurationProperty
-> AwsVpcConfigurationProperty -> AwsVpcConfigurationProperty
set PropertyType "Subnets" AwsVpcConfigurationProperty
newValue AwsVpcConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: AwsVpcConfigurationProperty -> ()
assignPublicIp :: AwsVpcConfigurationProperty -> Maybe (Value Text)
securityGroups :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
subnets :: AwsVpcConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
subnets :: Maybe (ValueList Text)
..}
    = AwsVpcConfigurationProperty {subnets :: Maybe (ValueList Text)
subnets = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Subnets" AwsVpcConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
haddock_workaround_ :: ()
assignPublicIp :: Maybe (Value Text)
securityGroups :: Maybe (ValueList Text)
..}