module Stratosphere.Batch.JobDefinition.EksSecretProperty (
        EksSecretProperty(..), mkEksSecretProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EksSecretProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-ekssecret.html>
    EksSecretProperty {EksSecretProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-ekssecret.html#cfn-batch-jobdefinition-ekssecret-optional>
                       EksSecretProperty -> Maybe (Value Bool)
optional :: (Prelude.Maybe (Value Prelude.Bool)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-ekssecret.html#cfn-batch-jobdefinition-ekssecret-secretname>
                       EksSecretProperty -> Value Text
secretName :: (Value Prelude.Text)}
  deriving stock (EksSecretProperty -> EksSecretProperty -> Bool
(EksSecretProperty -> EksSecretProperty -> Bool)
-> (EksSecretProperty -> EksSecretProperty -> Bool)
-> Eq EksSecretProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EksSecretProperty -> EksSecretProperty -> Bool
== :: EksSecretProperty -> EksSecretProperty -> Bool
$c/= :: EksSecretProperty -> EksSecretProperty -> Bool
/= :: EksSecretProperty -> EksSecretProperty -> Bool
Prelude.Eq, Int -> EksSecretProperty -> ShowS
[EksSecretProperty] -> ShowS
EksSecretProperty -> String
(Int -> EksSecretProperty -> ShowS)
-> (EksSecretProperty -> String)
-> ([EksSecretProperty] -> ShowS)
-> Show EksSecretProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EksSecretProperty -> ShowS
showsPrec :: Int -> EksSecretProperty -> ShowS
$cshow :: EksSecretProperty -> String
show :: EksSecretProperty -> String
$cshowList :: [EksSecretProperty] -> ShowS
showList :: [EksSecretProperty] -> ShowS
Prelude.Show)
mkEksSecretProperty :: Value Prelude.Text -> EksSecretProperty
mkEksSecretProperty :: Value Text -> EksSecretProperty
mkEksSecretProperty Value Text
secretName
  = EksSecretProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), secretName :: Value Text
secretName = Value Text
secretName,
       optional :: Maybe (Value Bool)
optional = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EksSecretProperty where
  toResourceProperties :: EksSecretProperty -> ResourceProperties
toResourceProperties EksSecretProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EksSecretProperty -> ()
optional :: EksSecretProperty -> Maybe (Value Bool)
secretName :: EksSecretProperty -> Value Text
haddock_workaround_ :: ()
optional :: Maybe (Value Bool)
secretName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Batch::JobDefinition.EksSecret",
         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
"SecretName" 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
secretName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Optional" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
optional]))}
instance JSON.ToJSON EksSecretProperty where
  toJSON :: EksSecretProperty -> Value
toJSON EksSecretProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EksSecretProperty -> ()
optional :: EksSecretProperty -> Maybe (Value Bool)
secretName :: EksSecretProperty -> Value Text
haddock_workaround_ :: ()
optional :: Maybe (Value Bool)
secretName :: 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
"SecretName" 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
secretName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Optional" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
optional])))
instance Property "Optional" EksSecretProperty where
  type PropertyType "Optional" EksSecretProperty = Value Prelude.Bool
  set :: PropertyType "Optional" EksSecretProperty
-> EksSecretProperty -> EksSecretProperty
set PropertyType "Optional" EksSecretProperty
newValue EksSecretProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EksSecretProperty -> ()
optional :: EksSecretProperty -> Maybe (Value Bool)
secretName :: EksSecretProperty -> Value Text
haddock_workaround_ :: ()
optional :: Maybe (Value Bool)
secretName :: Value Text
..}
    = EksSecretProperty {optional :: Maybe (Value Bool)
optional = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Optional" EksSecretProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
secretName :: Value Text
haddock_workaround_ :: ()
secretName :: Value Text
..}
instance Property "SecretName" EksSecretProperty where
  type PropertyType "SecretName" EksSecretProperty = Value Prelude.Text
  set :: PropertyType "SecretName" EksSecretProperty
-> EksSecretProperty -> EksSecretProperty
set PropertyType "SecretName" EksSecretProperty
newValue EksSecretProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: EksSecretProperty -> ()
optional :: EksSecretProperty -> Maybe (Value Bool)
secretName :: EksSecretProperty -> Value Text
haddock_workaround_ :: ()
optional :: Maybe (Value Bool)
secretName :: Value Text
..}
    = EksSecretProperty {secretName :: Value Text
secretName = PropertyType "SecretName" EksSecretProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
optional :: Maybe (Value Bool)
haddock_workaround_ :: ()
optional :: Maybe (Value Bool)
..}