module Stratosphere.Deadline.Queue.JobRunAsUserProperty (
        module Exports, JobRunAsUserProperty(..), mkJobRunAsUserProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Deadline.Queue.PosixUserProperty as Exports
import {-# SOURCE #-} Stratosphere.Deadline.Queue.WindowsUserProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JobRunAsUserProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-queue-jobrunasuser.html>
    JobRunAsUserProperty {JobRunAsUserProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-queue-jobrunasuser.html#cfn-deadline-queue-jobrunasuser-posix>
                          JobRunAsUserProperty -> Maybe PosixUserProperty
posix :: (Prelude.Maybe PosixUserProperty),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-queue-jobrunasuser.html#cfn-deadline-queue-jobrunasuser-runas>
                          JobRunAsUserProperty -> Value Text
runAs :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-queue-jobrunasuser.html#cfn-deadline-queue-jobrunasuser-windows>
                          JobRunAsUserProperty -> Maybe WindowsUserProperty
windows :: (Prelude.Maybe WindowsUserProperty)}
  deriving stock (JobRunAsUserProperty -> JobRunAsUserProperty -> Bool
(JobRunAsUserProperty -> JobRunAsUserProperty -> Bool)
-> (JobRunAsUserProperty -> JobRunAsUserProperty -> Bool)
-> Eq JobRunAsUserProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JobRunAsUserProperty -> JobRunAsUserProperty -> Bool
== :: JobRunAsUserProperty -> JobRunAsUserProperty -> Bool
$c/= :: JobRunAsUserProperty -> JobRunAsUserProperty -> Bool
/= :: JobRunAsUserProperty -> JobRunAsUserProperty -> Bool
Prelude.Eq, Int -> JobRunAsUserProperty -> ShowS
[JobRunAsUserProperty] -> ShowS
JobRunAsUserProperty -> String
(Int -> JobRunAsUserProperty -> ShowS)
-> (JobRunAsUserProperty -> String)
-> ([JobRunAsUserProperty] -> ShowS)
-> Show JobRunAsUserProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JobRunAsUserProperty -> ShowS
showsPrec :: Int -> JobRunAsUserProperty -> ShowS
$cshow :: JobRunAsUserProperty -> String
show :: JobRunAsUserProperty -> String
$cshowList :: [JobRunAsUserProperty] -> ShowS
showList :: [JobRunAsUserProperty] -> ShowS
Prelude.Show)
mkJobRunAsUserProperty ::
  Value Prelude.Text -> JobRunAsUserProperty
mkJobRunAsUserProperty :: Value Text -> JobRunAsUserProperty
mkJobRunAsUserProperty Value Text
runAs
  = JobRunAsUserProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), runAs :: Value Text
runAs = Value Text
runAs, posix :: Maybe PosixUserProperty
posix = Maybe PosixUserProperty
forall a. Maybe a
Prelude.Nothing,
       windows :: Maybe WindowsUserProperty
windows = Maybe WindowsUserProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JobRunAsUserProperty where
  toResourceProperties :: JobRunAsUserProperty -> ResourceProperties
toResourceProperties JobRunAsUserProperty {Maybe PosixUserProperty
Maybe WindowsUserProperty
()
Value Text
haddock_workaround_ :: JobRunAsUserProperty -> ()
posix :: JobRunAsUserProperty -> Maybe PosixUserProperty
runAs :: JobRunAsUserProperty -> Value Text
windows :: JobRunAsUserProperty -> Maybe WindowsUserProperty
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
windows :: Maybe WindowsUserProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Deadline::Queue.JobRunAsUser",
         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
"RunAs" 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
runAs]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> PosixUserProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Posix" (PosixUserProperty -> (Key, Value))
-> Maybe PosixUserProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PosixUserProperty
posix,
                               Key -> WindowsUserProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Windows" (WindowsUserProperty -> (Key, Value))
-> Maybe WindowsUserProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WindowsUserProperty
windows]))}
instance JSON.ToJSON JobRunAsUserProperty where
  toJSON :: JobRunAsUserProperty -> Value
toJSON JobRunAsUserProperty {Maybe PosixUserProperty
Maybe WindowsUserProperty
()
Value Text
haddock_workaround_ :: JobRunAsUserProperty -> ()
posix :: JobRunAsUserProperty -> Maybe PosixUserProperty
runAs :: JobRunAsUserProperty -> Value Text
windows :: JobRunAsUserProperty -> Maybe WindowsUserProperty
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
windows :: Maybe WindowsUserProperty
..}
    = [(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
"RunAs" 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
runAs]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> PosixUserProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Posix" (PosixUserProperty -> (Key, Value))
-> Maybe PosixUserProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PosixUserProperty
posix,
                  Key -> WindowsUserProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Windows" (WindowsUserProperty -> (Key, Value))
-> Maybe WindowsUserProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WindowsUserProperty
windows])))
instance Property "Posix" JobRunAsUserProperty where
  type PropertyType "Posix" JobRunAsUserProperty = PosixUserProperty
  set :: PropertyType "Posix" JobRunAsUserProperty
-> JobRunAsUserProperty -> JobRunAsUserProperty
set PropertyType "Posix" JobRunAsUserProperty
newValue JobRunAsUserProperty {Maybe PosixUserProperty
Maybe WindowsUserProperty
()
Value Text
haddock_workaround_ :: JobRunAsUserProperty -> ()
posix :: JobRunAsUserProperty -> Maybe PosixUserProperty
runAs :: JobRunAsUserProperty -> Value Text
windows :: JobRunAsUserProperty -> Maybe WindowsUserProperty
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
windows :: Maybe WindowsUserProperty
..}
    = JobRunAsUserProperty {posix :: Maybe PosixUserProperty
posix = PosixUserProperty -> Maybe PosixUserProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Posix" JobRunAsUserProperty
PosixUserProperty
newValue, Maybe WindowsUserProperty
()
Value Text
haddock_workaround_ :: ()
runAs :: Value Text
windows :: Maybe WindowsUserProperty
haddock_workaround_ :: ()
runAs :: Value Text
windows :: Maybe WindowsUserProperty
..}
instance Property "RunAs" JobRunAsUserProperty where
  type PropertyType "RunAs" JobRunAsUserProperty = Value Prelude.Text
  set :: PropertyType "RunAs" JobRunAsUserProperty
-> JobRunAsUserProperty -> JobRunAsUserProperty
set PropertyType "RunAs" JobRunAsUserProperty
newValue JobRunAsUserProperty {Maybe PosixUserProperty
Maybe WindowsUserProperty
()
Value Text
haddock_workaround_ :: JobRunAsUserProperty -> ()
posix :: JobRunAsUserProperty -> Maybe PosixUserProperty
runAs :: JobRunAsUserProperty -> Value Text
windows :: JobRunAsUserProperty -> Maybe WindowsUserProperty
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
windows :: Maybe WindowsUserProperty
..}
    = JobRunAsUserProperty {runAs :: Value Text
runAs = PropertyType "RunAs" JobRunAsUserProperty
Value Text
newValue, Maybe PosixUserProperty
Maybe WindowsUserProperty
()
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
windows :: Maybe WindowsUserProperty
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
windows :: Maybe WindowsUserProperty
..}
instance Property "Windows" JobRunAsUserProperty where
  type PropertyType "Windows" JobRunAsUserProperty = WindowsUserProperty
  set :: PropertyType "Windows" JobRunAsUserProperty
-> JobRunAsUserProperty -> JobRunAsUserProperty
set PropertyType "Windows" JobRunAsUserProperty
newValue JobRunAsUserProperty {Maybe PosixUserProperty
Maybe WindowsUserProperty
()
Value Text
haddock_workaround_ :: JobRunAsUserProperty -> ()
posix :: JobRunAsUserProperty -> Maybe PosixUserProperty
runAs :: JobRunAsUserProperty -> Value Text
windows :: JobRunAsUserProperty -> Maybe WindowsUserProperty
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
windows :: Maybe WindowsUserProperty
..}
    = JobRunAsUserProperty {windows :: Maybe WindowsUserProperty
windows = WindowsUserProperty -> Maybe WindowsUserProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Windows" JobRunAsUserProperty
WindowsUserProperty
newValue, Maybe PosixUserProperty
()
Value Text
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
haddock_workaround_ :: ()
posix :: Maybe PosixUserProperty
runAs :: Value Text
..}