module Stratosphere.ECS.Cluster.ExecuteCommandConfigurationProperty (
        module Exports, ExecuteCommandConfigurationProperty(..),
        mkExecuteCommandConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ECS.Cluster.ExecuteCommandLogConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ExecuteCommandConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html>
    ExecuteCommandConfigurationProperty {ExecuteCommandConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-kmskeyid>
                                         ExecuteCommandConfigurationProperty -> Maybe (Value Text)
kmsKeyId :: (Prelude.Maybe (Value Prelude.Text)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logconfiguration>
                                         ExecuteCommandConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
logConfiguration :: (Prelude.Maybe ExecuteCommandLogConfigurationProperty),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-cluster-executecommandconfiguration.html#cfn-ecs-cluster-executecommandconfiguration-logging>
                                         ExecuteCommandConfigurationProperty -> Maybe (Value Text)
logging :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty -> Bool
(ExecuteCommandConfigurationProperty
 -> ExecuteCommandConfigurationProperty -> Bool)
-> (ExecuteCommandConfigurationProperty
    -> ExecuteCommandConfigurationProperty -> Bool)
-> Eq ExecuteCommandConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty -> Bool
== :: ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty -> Bool
$c/= :: ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty -> Bool
/= :: ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty -> Bool
Prelude.Eq, Int -> ExecuteCommandConfigurationProperty -> ShowS
[ExecuteCommandConfigurationProperty] -> ShowS
ExecuteCommandConfigurationProperty -> String
(Int -> ExecuteCommandConfigurationProperty -> ShowS)
-> (ExecuteCommandConfigurationProperty -> String)
-> ([ExecuteCommandConfigurationProperty] -> ShowS)
-> Show ExecuteCommandConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExecuteCommandConfigurationProperty -> ShowS
showsPrec :: Int -> ExecuteCommandConfigurationProperty -> ShowS
$cshow :: ExecuteCommandConfigurationProperty -> String
show :: ExecuteCommandConfigurationProperty -> String
$cshowList :: [ExecuteCommandConfigurationProperty] -> ShowS
showList :: [ExecuteCommandConfigurationProperty] -> ShowS
Prelude.Show)
mkExecuteCommandConfigurationProperty ::
  ExecuteCommandConfigurationProperty
mkExecuteCommandConfigurationProperty :: ExecuteCommandConfigurationProperty
mkExecuteCommandConfigurationProperty
  = ExecuteCommandConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), kmsKeyId :: Maybe (Value Text)
kmsKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logConfiguration = Maybe ExecuteCommandLogConfigurationProperty
forall a. Maybe a
Prelude.Nothing, logging :: Maybe (Value Text)
logging = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExecuteCommandConfigurationProperty where
  toResourceProperties :: ExecuteCommandConfigurationProperty -> ResourceProperties
toResourceProperties ExecuteCommandConfigurationProperty {Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ExecuteCommandConfigurationProperty -> ()
kmsKeyId :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
logConfiguration :: ExecuteCommandConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
logging :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::Cluster.ExecuteCommandConfiguration",
         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
"KmsKeyId" (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)
kmsKeyId,
                            Key -> ExecuteCommandLogConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LogConfiguration" (ExecuteCommandLogConfigurationProperty -> (Key, Value))
-> Maybe ExecuteCommandLogConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecuteCommandLogConfigurationProperty
logConfiguration,
                            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
"Logging" (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)
logging])}
instance JSON.ToJSON ExecuteCommandConfigurationProperty where
  toJSON :: ExecuteCommandConfigurationProperty -> Value
toJSON ExecuteCommandConfigurationProperty {Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ExecuteCommandConfigurationProperty -> ()
kmsKeyId :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
logConfiguration :: ExecuteCommandConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
logging :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: 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
"KmsKeyId" (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)
kmsKeyId,
               Key -> ExecuteCommandLogConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LogConfiguration" (ExecuteCommandLogConfigurationProperty -> (Key, Value))
-> Maybe ExecuteCommandLogConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecuteCommandLogConfigurationProperty
logConfiguration,
               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
"Logging" (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)
logging]))
instance Property "KmsKeyId" ExecuteCommandConfigurationProperty where
  type PropertyType "KmsKeyId" ExecuteCommandConfigurationProperty = Value Prelude.Text
  set :: PropertyType "KmsKeyId" ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty
set PropertyType "KmsKeyId" ExecuteCommandConfigurationProperty
newValue ExecuteCommandConfigurationProperty {Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ExecuteCommandConfigurationProperty -> ()
kmsKeyId :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
logConfiguration :: ExecuteCommandConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
logging :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: Maybe (Value Text)
..}
    = ExecuteCommandConfigurationProperty
        {kmsKeyId :: Maybe (Value Text)
kmsKeyId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KmsKeyId" ExecuteCommandConfigurationProperty
Value Text
newValue, Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ()
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: Maybe (Value Text)
haddock_workaround_ :: ()
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: Maybe (Value Text)
..}
instance Property "LogConfiguration" ExecuteCommandConfigurationProperty where
  type PropertyType "LogConfiguration" ExecuteCommandConfigurationProperty = ExecuteCommandLogConfigurationProperty
  set :: PropertyType "LogConfiguration" ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty
set PropertyType "LogConfiguration" ExecuteCommandConfigurationProperty
newValue ExecuteCommandConfigurationProperty {Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ExecuteCommandConfigurationProperty -> ()
kmsKeyId :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
logConfiguration :: ExecuteCommandConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
logging :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: Maybe (Value Text)
..}
    = ExecuteCommandConfigurationProperty
        {logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logConfiguration = ExecuteCommandLogConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogConfiguration" ExecuteCommandConfigurationProperty
ExecuteCommandLogConfigurationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logging :: Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logging :: Maybe (Value Text)
..}
instance Property "Logging" ExecuteCommandConfigurationProperty where
  type PropertyType "Logging" ExecuteCommandConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Logging" ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty
-> ExecuteCommandConfigurationProperty
set PropertyType "Logging" ExecuteCommandConfigurationProperty
newValue ExecuteCommandConfigurationProperty {Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ExecuteCommandConfigurationProperty -> ()
kmsKeyId :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
logConfiguration :: ExecuteCommandConfigurationProperty
-> Maybe ExecuteCommandLogConfigurationProperty
logging :: ExecuteCommandConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
logging :: Maybe (Value Text)
..}
    = ExecuteCommandConfigurationProperty
        {logging :: Maybe (Value Text)
logging = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Logging" ExecuteCommandConfigurationProperty
Value Text
newValue, Maybe (Value Text)
Maybe ExecuteCommandLogConfigurationProperty
()
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
haddock_workaround_ :: ()
kmsKeyId :: Maybe (Value Text)
logConfiguration :: Maybe ExecuteCommandLogConfigurationProperty
..}