module Stratosphere.ECS.Service.AdvancedConfigurationProperty (
        AdvancedConfigurationProperty(..), mkAdvancedConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AdvancedConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html>
    AdvancedConfigurationProperty {AdvancedConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-alternatetargetgrouparn>
                                   AdvancedConfigurationProperty -> Value Text
alternateTargetGroupArn :: (Value Prelude.Text),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-productionlistenerrule>
                                   AdvancedConfigurationProperty -> Maybe (Value Text)
productionListenerRule :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-rolearn>
                                   AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-advancedconfiguration.html#cfn-ecs-service-advancedconfiguration-testlistenerrule>
                                   AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> Bool
(AdvancedConfigurationProperty
 -> AdvancedConfigurationProperty -> Bool)
-> (AdvancedConfigurationProperty
    -> AdvancedConfigurationProperty -> Bool)
-> Eq AdvancedConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> Bool
== :: AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> Bool
$c/= :: AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> Bool
/= :: AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> Bool
Prelude.Eq, Int -> AdvancedConfigurationProperty -> ShowS
[AdvancedConfigurationProperty] -> ShowS
AdvancedConfigurationProperty -> String
(Int -> AdvancedConfigurationProperty -> ShowS)
-> (AdvancedConfigurationProperty -> String)
-> ([AdvancedConfigurationProperty] -> ShowS)
-> Show AdvancedConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AdvancedConfigurationProperty -> ShowS
showsPrec :: Int -> AdvancedConfigurationProperty -> ShowS
$cshow :: AdvancedConfigurationProperty -> String
show :: AdvancedConfigurationProperty -> String
$cshowList :: [AdvancedConfigurationProperty] -> ShowS
showList :: [AdvancedConfigurationProperty] -> ShowS
Prelude.Show)
mkAdvancedConfigurationProperty ::
  Value Prelude.Text -> AdvancedConfigurationProperty
mkAdvancedConfigurationProperty :: Value Text -> AdvancedConfigurationProperty
mkAdvancedConfigurationProperty Value Text
alternateTargetGroupArn
  = AdvancedConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       alternateTargetGroupArn :: Value Text
alternateTargetGroupArn = Value Text
alternateTargetGroupArn,
       productionListenerRule :: Maybe (Value Text)
productionListenerRule = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, testListenerRule :: Maybe (Value Text)
testListenerRule = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AdvancedConfigurationProperty where
  toResourceProperties :: AdvancedConfigurationProperty -> ResourceProperties
toResourceProperties AdvancedConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AdvancedConfigurationProperty -> ()
alternateTargetGroupArn :: AdvancedConfigurationProperty -> Value Text
productionListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::Service.AdvancedConfiguration",
         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
"AlternateTargetGroupArn" 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
alternateTargetGroupArn]
                           ([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
"ProductionListenerRule"
                                 (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)
productionListenerRule,
                               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
"RoleArn" (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)
roleArn,
                               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
"TestListenerRule" (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)
testListenerRule]))}
instance JSON.ToJSON AdvancedConfigurationProperty where
  toJSON :: AdvancedConfigurationProperty -> Value
toJSON AdvancedConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AdvancedConfigurationProperty -> ()
alternateTargetGroupArn :: AdvancedConfigurationProperty -> Value Text
productionListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (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
"AlternateTargetGroupArn" 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
alternateTargetGroupArn]
              ([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
"ProductionListenerRule"
                    (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)
productionListenerRule,
                  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
"RoleArn" (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)
roleArn,
                  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
"TestListenerRule" (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)
testListenerRule])))
instance Property "AlternateTargetGroupArn" AdvancedConfigurationProperty where
  type PropertyType "AlternateTargetGroupArn" AdvancedConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "AlternateTargetGroupArn" AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> AdvancedConfigurationProperty
set PropertyType
  "AlternateTargetGroupArn" AdvancedConfigurationProperty
newValue AdvancedConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AdvancedConfigurationProperty -> ()
alternateTargetGroupArn :: AdvancedConfigurationProperty -> Value Text
productionListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
    = AdvancedConfigurationProperty
        {alternateTargetGroupArn :: Value Text
alternateTargetGroupArn = PropertyType
  "AlternateTargetGroupArn" AdvancedConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
haddock_workaround_ :: ()
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
instance Property "ProductionListenerRule" AdvancedConfigurationProperty where
  type PropertyType "ProductionListenerRule" AdvancedConfigurationProperty = Value Prelude.Text
  set :: PropertyType "ProductionListenerRule" AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> AdvancedConfigurationProperty
set PropertyType "ProductionListenerRule" AdvancedConfigurationProperty
newValue AdvancedConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AdvancedConfigurationProperty -> ()
alternateTargetGroupArn :: AdvancedConfigurationProperty -> Value Text
productionListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
    = AdvancedConfigurationProperty
        {productionListenerRule :: Maybe (Value Text)
productionListenerRule = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProductionListenerRule" AdvancedConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
instance Property "RoleArn" AdvancedConfigurationProperty where
  type PropertyType "RoleArn" AdvancedConfigurationProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> AdvancedConfigurationProperty
set PropertyType "RoleArn" AdvancedConfigurationProperty
newValue AdvancedConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AdvancedConfigurationProperty -> ()
alternateTargetGroupArn :: AdvancedConfigurationProperty -> Value Text
productionListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
    = AdvancedConfigurationProperty
        {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" AdvancedConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
instance Property "TestListenerRule" AdvancedConfigurationProperty where
  type PropertyType "TestListenerRule" AdvancedConfigurationProperty = Value Prelude.Text
  set :: PropertyType "TestListenerRule" AdvancedConfigurationProperty
-> AdvancedConfigurationProperty -> AdvancedConfigurationProperty
set PropertyType "TestListenerRule" AdvancedConfigurationProperty
newValue AdvancedConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AdvancedConfigurationProperty -> ()
alternateTargetGroupArn :: AdvancedConfigurationProperty -> Value Text
productionListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
roleArn :: AdvancedConfigurationProperty -> Maybe (Value Text)
testListenerRule :: AdvancedConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
testListenerRule :: Maybe (Value Text)
..}
    = AdvancedConfigurationProperty
        {testListenerRule :: Maybe (Value Text)
testListenerRule = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TestListenerRule" AdvancedConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
alternateTargetGroupArn :: Value Text
productionListenerRule :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
..}