module Stratosphere.Batch.JobDefinition.ImagePullSecretProperty (
        ImagePullSecretProperty(..), mkImagePullSecretProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ImagePullSecretProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-imagepullsecret.html>
    ImagePullSecretProperty {ImagePullSecretProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-jobdefinition-imagepullsecret.html#cfn-batch-jobdefinition-imagepullsecret-name>
                             ImagePullSecretProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ImagePullSecretProperty -> ImagePullSecretProperty -> Bool
(ImagePullSecretProperty -> ImagePullSecretProperty -> Bool)
-> (ImagePullSecretProperty -> ImagePullSecretProperty -> Bool)
-> Eq ImagePullSecretProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ImagePullSecretProperty -> ImagePullSecretProperty -> Bool
== :: ImagePullSecretProperty -> ImagePullSecretProperty -> Bool
$c/= :: ImagePullSecretProperty -> ImagePullSecretProperty -> Bool
/= :: ImagePullSecretProperty -> ImagePullSecretProperty -> Bool
Prelude.Eq, Int -> ImagePullSecretProperty -> ShowS
[ImagePullSecretProperty] -> ShowS
ImagePullSecretProperty -> String
(Int -> ImagePullSecretProperty -> ShowS)
-> (ImagePullSecretProperty -> String)
-> ([ImagePullSecretProperty] -> ShowS)
-> Show ImagePullSecretProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ImagePullSecretProperty -> ShowS
showsPrec :: Int -> ImagePullSecretProperty -> ShowS
$cshow :: ImagePullSecretProperty -> String
show :: ImagePullSecretProperty -> String
$cshowList :: [ImagePullSecretProperty] -> ShowS
showList :: [ImagePullSecretProperty] -> ShowS
Prelude.Show)
mkImagePullSecretProperty :: ImagePullSecretProperty
mkImagePullSecretProperty :: ImagePullSecretProperty
mkImagePullSecretProperty
  = ImagePullSecretProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ImagePullSecretProperty where
  toResourceProperties :: ImagePullSecretProperty -> ResourceProperties
toResourceProperties ImagePullSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: ImagePullSecretProperty -> ()
name :: ImagePullSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Batch::JobDefinition.ImagePullSecret",
         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
"Name" (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)
name])}
instance JSON.ToJSON ImagePullSecretProperty where
  toJSON :: ImagePullSecretProperty -> Value
toJSON ImagePullSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: ImagePullSecretProperty -> ()
name :: ImagePullSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: 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
"Name" (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)
name]))
instance Property "Name" ImagePullSecretProperty where
  type PropertyType "Name" ImagePullSecretProperty = Value Prelude.Text
  set :: PropertyType "Name" ImagePullSecretProperty
-> ImagePullSecretProperty -> ImagePullSecretProperty
set PropertyType "Name" ImagePullSecretProperty
newValue ImagePullSecretProperty {Maybe (Value Text)
()
haddock_workaround_ :: ImagePullSecretProperty -> ()
name :: ImagePullSecretProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
    = ImagePullSecretProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ImagePullSecretProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}