module Stratosphere.EMR.InstanceGroupConfig.ConfigurationProperty (
        ConfigurationProperty(..), mkConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html>
    ConfigurationProperty {ConfigurationProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html#cfn-emr-cluster-configuration-classification>
                           ConfigurationProperty -> Maybe (Value Text)
classification :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html#cfn-emr-cluster-configuration-configurationproperties>
                           ConfigurationProperty -> Maybe (Map Text (Value Text))
configurationProperties :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-emr-cluster-configuration.html#cfn-emr-cluster-configuration-configurations>
                           ConfigurationProperty -> Maybe [ConfigurationProperty]
configurations :: (Prelude.Maybe [ConfigurationProperty])}
  deriving stock (ConfigurationProperty -> ConfigurationProperty -> Bool
(ConfigurationProperty -> ConfigurationProperty -> Bool)
-> (ConfigurationProperty -> ConfigurationProperty -> Bool)
-> Eq ConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfigurationProperty -> ConfigurationProperty -> Bool
== :: ConfigurationProperty -> ConfigurationProperty -> Bool
$c/= :: ConfigurationProperty -> ConfigurationProperty -> Bool
/= :: ConfigurationProperty -> ConfigurationProperty -> Bool
Prelude.Eq, Int -> ConfigurationProperty -> ShowS
[ConfigurationProperty] -> ShowS
ConfigurationProperty -> String
(Int -> ConfigurationProperty -> ShowS)
-> (ConfigurationProperty -> String)
-> ([ConfigurationProperty] -> ShowS)
-> Show ConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfigurationProperty -> ShowS
showsPrec :: Int -> ConfigurationProperty -> ShowS
$cshow :: ConfigurationProperty -> String
show :: ConfigurationProperty -> String
$cshowList :: [ConfigurationProperty] -> ShowS
showList :: [ConfigurationProperty] -> ShowS
Prelude.Show)
mkConfigurationProperty :: ConfigurationProperty
mkConfigurationProperty :: ConfigurationProperty
mkConfigurationProperty
  = ConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), classification :: Maybe (Value Text)
classification = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       configurationProperties :: Maybe (Map Text (Value Text))
configurationProperties = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
       configurations :: Maybe [ConfigurationProperty]
configurations = Maybe [ConfigurationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfigurationProperty where
  toResourceProperties :: ConfigurationProperty -> ResourceProperties
toResourceProperties ConfigurationProperty {Maybe [ConfigurationProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationProperty -> ()
classification :: ConfigurationProperty -> Maybe (Value Text)
configurationProperties :: ConfigurationProperty -> Maybe (Map Text (Value Text))
configurations :: ConfigurationProperty -> Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMR::InstanceGroupConfig.Configuration",
         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
"Classification" (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)
classification,
                            Key -> Map Text (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
"ConfigurationProperties"
                              (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
configurationProperties,
                            Key -> [ConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Configurations" ([ConfigurationProperty] -> (Key, Value))
-> Maybe [ConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigurationProperty]
configurations])}
instance JSON.ToJSON ConfigurationProperty where
  toJSON :: ConfigurationProperty -> Value
toJSON ConfigurationProperty {Maybe [ConfigurationProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationProperty -> ()
classification :: ConfigurationProperty -> Maybe (Value Text)
configurationProperties :: ConfigurationProperty -> Maybe (Map Text (Value Text))
configurations :: ConfigurationProperty -> Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
..}
    = [(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
"Classification" (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)
classification,
               Key -> Map Text (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
"ConfigurationProperties"
                 (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
configurationProperties,
               Key -> [ConfigurationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Configurations" ([ConfigurationProperty] -> (Key, Value))
-> Maybe [ConfigurationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfigurationProperty]
configurations]))
instance Property "Classification" ConfigurationProperty where
  type PropertyType "Classification" ConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Classification" ConfigurationProperty
-> ConfigurationProperty -> ConfigurationProperty
set PropertyType "Classification" ConfigurationProperty
newValue ConfigurationProperty {Maybe [ConfigurationProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationProperty -> ()
classification :: ConfigurationProperty -> Maybe (Value Text)
configurationProperties :: ConfigurationProperty -> Maybe (Map Text (Value Text))
configurations :: ConfigurationProperty -> Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
..}
    = ConfigurationProperty
        {classification :: Maybe (Value Text)
classification = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Classification" ConfigurationProperty
Value Text
newValue, Maybe [ConfigurationProperty]
Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
..}
instance Property "ConfigurationProperties" ConfigurationProperty where
  type PropertyType "ConfigurationProperties" ConfigurationProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "ConfigurationProperties" ConfigurationProperty
-> ConfigurationProperty -> ConfigurationProperty
set PropertyType "ConfigurationProperties" ConfigurationProperty
newValue ConfigurationProperty {Maybe [ConfigurationProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationProperty -> ()
classification :: ConfigurationProperty -> Maybe (Value Text)
configurationProperties :: ConfigurationProperty -> Maybe (Map Text (Value Text))
configurations :: ConfigurationProperty -> Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
..}
    = ConfigurationProperty
        {configurationProperties :: Maybe (Map Text (Value Text))
configurationProperties = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "ConfigurationProperties" ConfigurationProperty
newValue, Maybe [ConfigurationProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurations :: Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurations :: Maybe [ConfigurationProperty]
..}
instance Property "Configurations" ConfigurationProperty where
  type PropertyType "Configurations" ConfigurationProperty = [ConfigurationProperty]
  set :: PropertyType "Configurations" ConfigurationProperty
-> ConfigurationProperty -> ConfigurationProperty
set PropertyType "Configurations" ConfigurationProperty
newValue ConfigurationProperty {Maybe [ConfigurationProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ConfigurationProperty -> ()
classification :: ConfigurationProperty -> Maybe (Value Text)
configurationProperties :: ConfigurationProperty -> Maybe (Map Text (Value Text))
configurations :: ConfigurationProperty -> Maybe [ConfigurationProperty]
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
configurations :: Maybe [ConfigurationProperty]
..}
    = ConfigurationProperty
        {configurations :: Maybe [ConfigurationProperty]
configurations = [ConfigurationProperty] -> Maybe [ConfigurationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConfigurationProperty]
PropertyType "Configurations" ConfigurationProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
classification :: Maybe (Value Text)
configurationProperties :: Maybe (Map Text (Value Text))
..}