module Stratosphere.Batch.ServiceEnvironment (
        module Exports, ServiceEnvironment(..), mkServiceEnvironment
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Batch.ServiceEnvironment.CapacityLimitProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ServiceEnvironment
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html>
    ServiceEnvironment {ServiceEnvironment -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html#cfn-batch-serviceenvironment-capacitylimits>
                        ServiceEnvironment -> [CapacityLimitProperty]
capacityLimits :: [CapacityLimitProperty],
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html#cfn-batch-serviceenvironment-serviceenvironmentname>
                        ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentName :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html#cfn-batch-serviceenvironment-serviceenvironmenttype>
                        ServiceEnvironment -> Value Text
serviceEnvironmentType :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html#cfn-batch-serviceenvironment-state>
                        ServiceEnvironment -> Maybe (Value Text)
state :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html#cfn-batch-serviceenvironment-tags>
                        ServiceEnvironment -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (ServiceEnvironment -> ServiceEnvironment -> Bool
(ServiceEnvironment -> ServiceEnvironment -> Bool)
-> (ServiceEnvironment -> ServiceEnvironment -> Bool)
-> Eq ServiceEnvironment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServiceEnvironment -> ServiceEnvironment -> Bool
== :: ServiceEnvironment -> ServiceEnvironment -> Bool
$c/= :: ServiceEnvironment -> ServiceEnvironment -> Bool
/= :: ServiceEnvironment -> ServiceEnvironment -> Bool
Prelude.Eq, Int -> ServiceEnvironment -> ShowS
[ServiceEnvironment] -> ShowS
ServiceEnvironment -> String
(Int -> ServiceEnvironment -> ShowS)
-> (ServiceEnvironment -> String)
-> ([ServiceEnvironment] -> ShowS)
-> Show ServiceEnvironment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServiceEnvironment -> ShowS
showsPrec :: Int -> ServiceEnvironment -> ShowS
$cshow :: ServiceEnvironment -> String
show :: ServiceEnvironment -> String
$cshowList :: [ServiceEnvironment] -> ShowS
showList :: [ServiceEnvironment] -> ShowS
Prelude.Show)
mkServiceEnvironment ::
  [CapacityLimitProperty] -> Value Prelude.Text -> ServiceEnvironment
mkServiceEnvironment :: [CapacityLimitProperty] -> Value Text -> ServiceEnvironment
mkServiceEnvironment [CapacityLimitProperty]
capacityLimits Value Text
serviceEnvironmentType
  = ServiceEnvironment
      {haddock_workaround_ :: ()
haddock_workaround_ = (), capacityLimits :: [CapacityLimitProperty]
capacityLimits = [CapacityLimitProperty]
capacityLimits,
       serviceEnvironmentType :: Value Text
serviceEnvironmentType = Value Text
serviceEnvironmentType,
       serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, state :: Maybe (Value Text)
state = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServiceEnvironment where
  toResourceProperties :: ServiceEnvironment -> ResourceProperties
toResourceProperties ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Batch::ServiceEnvironment",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"CapacityLimits" Key -> [CapacityLimitProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [CapacityLimitProperty]
capacityLimits,
                            Key
"ServiceEnvironmentType" 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
serviceEnvironmentType]
                           ([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
"ServiceEnvironmentName"
                                 (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)
serviceEnvironmentName,
                               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
"State" (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)
state,
                               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
"Tags" (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))
tags]))}
instance JSON.ToJSON ServiceEnvironment where
  toJSON :: ServiceEnvironment -> Value
toJSON ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (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
"CapacityLimits" Key -> [CapacityLimitProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [CapacityLimitProperty]
capacityLimits,
               Key
"ServiceEnvironmentType" 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
serviceEnvironmentType]
              ([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
"ServiceEnvironmentName"
                    (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)
serviceEnvironmentName,
                  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
"State" (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)
state,
                  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
"Tags" (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))
tags])))
instance Property "CapacityLimits" ServiceEnvironment where
  type PropertyType "CapacityLimits" ServiceEnvironment = [CapacityLimitProperty]
  set :: PropertyType "CapacityLimits" ServiceEnvironment
-> ServiceEnvironment -> ServiceEnvironment
set PropertyType "CapacityLimits" ServiceEnvironment
newValue ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
    = ServiceEnvironment {capacityLimits :: [CapacityLimitProperty]
capacityLimits = [CapacityLimitProperty]
PropertyType "CapacityLimits" ServiceEnvironment
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "ServiceEnvironmentName" ServiceEnvironment where
  type PropertyType "ServiceEnvironmentName" ServiceEnvironment = Value Prelude.Text
  set :: PropertyType "ServiceEnvironmentName" ServiceEnvironment
-> ServiceEnvironment -> ServiceEnvironment
set PropertyType "ServiceEnvironmentName" ServiceEnvironment
newValue ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
    = ServiceEnvironment
        {serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ServiceEnvironmentName" ServiceEnvironment
Value Text
newValue, [CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "ServiceEnvironmentType" ServiceEnvironment where
  type PropertyType "ServiceEnvironmentType" ServiceEnvironment = Value Prelude.Text
  set :: PropertyType "ServiceEnvironmentType" ServiceEnvironment
-> ServiceEnvironment -> ServiceEnvironment
set PropertyType "ServiceEnvironmentType" ServiceEnvironment
newValue ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
    = ServiceEnvironment {serviceEnvironmentType :: Value Text
serviceEnvironmentType = PropertyType "ServiceEnvironmentType" ServiceEnvironment
Value Text
newValue, [CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "State" ServiceEnvironment where
  type PropertyType "State" ServiceEnvironment = Value Prelude.Text
  set :: PropertyType "State" ServiceEnvironment
-> ServiceEnvironment -> ServiceEnvironment
set PropertyType "State" ServiceEnvironment
newValue ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
    = ServiceEnvironment {state :: Maybe (Value Text)
state = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "State" ServiceEnvironment
Value Text
newValue, [CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" ServiceEnvironment where
  type PropertyType "Tags" ServiceEnvironment = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" ServiceEnvironment
-> ServiceEnvironment -> ServiceEnvironment
set PropertyType "Tags" ServiceEnvironment
newValue ServiceEnvironment {[CapacityLimitProperty]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ServiceEnvironment -> ()
capacityLimits :: ServiceEnvironment -> [CapacityLimitProperty]
serviceEnvironmentName :: ServiceEnvironment -> Maybe (Value Text)
serviceEnvironmentType :: ServiceEnvironment -> Value Text
state :: ServiceEnvironment -> Maybe (Value Text)
tags :: ServiceEnvironment -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
    = ServiceEnvironment {tags :: Maybe (Map Text (Value Text))
tags = 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 "Tags" ServiceEnvironment
newValue, [CapacityLimitProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityLimits :: [CapacityLimitProperty]
serviceEnvironmentName :: Maybe (Value Text)
serviceEnvironmentType :: Value Text
state :: Maybe (Value Text)
..}