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: ServiceEnvironment {haddock_workaround_ :: (), -- | See: capacityLimits :: [CapacityLimitProperty], -- | See: serviceEnvironmentName :: (Prelude.Maybe (Value Prelude.Text)), -- | See: serviceEnvironmentType :: (Value Prelude.Text), -- | See: state :: (Prelude.Maybe (Value Prelude.Text)), -- | See: tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))} deriving stock (Prelude.Eq, Prelude.Show) mkServiceEnvironment :: [CapacityLimitProperty] -> Value Prelude.Text -> ServiceEnvironment mkServiceEnvironment capacityLimits serviceEnvironmentType = ServiceEnvironment {haddock_workaround_ = (), capacityLimits = capacityLimits, serviceEnvironmentType = serviceEnvironmentType, serviceEnvironmentName = Prelude.Nothing, state = Prelude.Nothing, tags = Prelude.Nothing} instance ToResourceProperties ServiceEnvironment where toResourceProperties ServiceEnvironment {..} = ResourceProperties {awsType = "AWS::Batch::ServiceEnvironment", supportsTags = Prelude.True, properties = Prelude.fromList ((Prelude.<>) ["CapacityLimits" JSON..= capacityLimits, "ServiceEnvironmentType" JSON..= serviceEnvironmentType] (Prelude.catMaybes [(JSON..=) "ServiceEnvironmentName" Prelude.<$> serviceEnvironmentName, (JSON..=) "State" Prelude.<$> state, (JSON..=) "Tags" Prelude.<$> tags]))} instance JSON.ToJSON ServiceEnvironment where toJSON ServiceEnvironment {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["CapacityLimits" JSON..= capacityLimits, "ServiceEnvironmentType" JSON..= serviceEnvironmentType] (Prelude.catMaybes [(JSON..=) "ServiceEnvironmentName" Prelude.<$> serviceEnvironmentName, (JSON..=) "State" Prelude.<$> state, (JSON..=) "Tags" Prelude.<$> tags]))) instance Property "CapacityLimits" ServiceEnvironment where type PropertyType "CapacityLimits" ServiceEnvironment = [CapacityLimitProperty] set newValue ServiceEnvironment {..} = ServiceEnvironment {capacityLimits = newValue, ..} instance Property "ServiceEnvironmentName" ServiceEnvironment where type PropertyType "ServiceEnvironmentName" ServiceEnvironment = Value Prelude.Text set newValue ServiceEnvironment {..} = ServiceEnvironment {serviceEnvironmentName = Prelude.pure newValue, ..} instance Property "ServiceEnvironmentType" ServiceEnvironment where type PropertyType "ServiceEnvironmentType" ServiceEnvironment = Value Prelude.Text set newValue ServiceEnvironment {..} = ServiceEnvironment {serviceEnvironmentType = newValue, ..} instance Property "State" ServiceEnvironment where type PropertyType "State" ServiceEnvironment = Value Prelude.Text set newValue ServiceEnvironment {..} = ServiceEnvironment {state = Prelude.pure newValue, ..} instance Property "Tags" ServiceEnvironment where type PropertyType "Tags" ServiceEnvironment = Prelude.Map Prelude.Text (Value Prelude.Text) set newValue ServiceEnvironment {..} = ServiceEnvironment {tags = Prelude.pure newValue, ..}