"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CfnServiceEnvironmentPropsMixin = exports.CfnQuotaSharePropsMixin = exports.CfnConsumableResourcePropsMixin = exports.CfnSchedulingPolicyPropsMixin = exports.CfnJobQueuePropsMixin = exports.CfnJobDefinitionPropsMixin = exports.CfnComputeEnvironmentPropsMixin = void 0;
const jsiiDeprecationWarnings = require("../../../.warnings.jsii.js");
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
/* eslint-disable @stylistic/max-len, eol-last */
const cdk = __importStar(require("aws-cdk-lib/core"));
const service = __importStar(require("aws-cdk-lib/aws-batch"));
/**
 * The `AWS::Batch::ComputeEnvironment` resource defines your AWS Batch compute environment.
 *
 * You can define `MANAGED` or `UNMANAGED` compute environments. `MANAGED` compute environments can use Amazon EC2 or AWS Fargate resources. `UNMANAGED` compute environments can only use EC2 resources. For more information, see [Compute Environments](https://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) in the ** .
 *
 * In a managed compute environment, AWS Batch manages the capacity and instance types of the compute resources within the environment. This is based on the compute resource specification that you define or the [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) that you specify when you create the compute environment. You can choose either to use EC2 On-Demand Instances and EC2 Spot Instances, or to use Fargate and Fargate Spot capacity in your managed compute environment. You can optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is below a specified percentage of the On-Demand price.
 *
 * > Multi-node parallel jobs are not supported on Spot Instances.
 *
 * In an unmanaged compute environment, you can manage your own EC2 compute resources and have a lot of flexibility with how you configure your compute resources. For example, you can use custom AMI. However, you need to verify that your AMI meets the Amazon ECS container instance AMI specification. For more information, see [container instance AMIs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html) in the *Amazon Elastic Container Service Developer Guide* . After you have created your unmanaged compute environment, you can use the [DescribeComputeEnvironments](https://docs.aws.amazon.com/batch/latest/APIReference/API_DescribeComputeEnvironments.html) operation to find the Amazon ECS cluster that is associated with it. Then, manually launch your container instances into that Amazon ECS cluster. For more information, see [Launching an Amazon ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) in the *Amazon Elastic Container Service Developer Guide* .
 *
 * > To create a compute environment that uses EKS resources, the caller must have permissions to call `eks:DescribeCluster` . > AWS Batch doesn't upgrade the AMIs in a compute environment after it's created except under specific conditions. For example, it doesn't automatically update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible for the management of the guest operating system (including updates and security patches) and any additional application software or utilities that you install on the compute resources. There are two ways to use a new AMI for your AWS Batch jobs. The original method is to complete these steps:
 * >
 * > - Create a new compute environment with the new AMI.
 * > - Add the compute environment to an existing job queue.
 * > - Remove the earlier compute environment from your job queue.
 * > - Delete the earlier compute environment.
 * >
 * > In April 2022, AWS Batch added enhanced support for updating compute environments. For example, the `UpdateComputeEnvironent` API lets you use the `ReplaceComputeEnvironment` property to dynamically update compute environment parameters such as the launch template or instance type without replacement. For more information, see [Updating compute environments](https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html) in the *AWS Batch User Guide* .
 * >
 * > To use the enhanced updating of compute environments to update AMIs, follow these rules:
 * >
 * > - Either do not set the [ServiceRole](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-servicerole) property or set it to the *AWSServiceRoleForBatch* service-linked role.
 * > - Set the [AllocationStrategy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-allocationstrategy) property to `BEST_FIT_PROGRESSIVE` or `SPOT_CAPACITY_OPTIMIZED` .
 * > - Set the [ReplaceComputeEnvironment](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-replacecomputeenvironment) property to `false` .
 * >
 * > > Set the `ReplaceComputeEnvironment` property to `true` if the compute environment uses the `BEST_FIT` allocation strategy. > If the `ReplaceComputeEnvironment` property is set to `false` , you might receive an error message when you update the CFN template for a compute environment. This issue occurs if the updated `desiredvcpus` value is less than the current `desiredvcpus` value. As a workaround, delete the `desiredvcpus` value from the updated template or use the `minvcpus` property to manage the number of vCPUs. For information, see [Error message when you update the `DesiredvCpus` setting](https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#error-desired-vcpus-update) .
 * > - Set the [UpdateToLatestImageVersion](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion) property to `true` . This property is used when you update a compute environment. The [UpdateToLatestImageVersion](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion) property is ignored when you create a compute environment.
 * > - Either do not specify an image ID in [ImageId](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-imageid) or [ImageIdOverride](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html#cfn-batch-computeenvironment-ec2configurationobject-imageidoverride) properties, or in the launch template identified by the [Launch Template](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-launchtemplate) property. In that case AWS Batch will select the latest Amazon ECS optimized AMI supported by AWS Batch at the time the infrastructure update is initiated. Alternatively you can specify the AMI ID in the `ImageId` or `ImageIdOverride` properties, or the launch template identified by the `LaunchTemplate` properties. Changing any of these properties will trigger an infrastructure update.
 * >
 * > If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be re-selected. If the [Version](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html#cfn-batch-computeenvironment-launchtemplatespecification-version) property of the [LaunchTemplateSpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html) is set to `$Latest` or `$Default` , the latest or default version of the launch template will be evaluated up at the time of the infrastructure update, even if the `LaunchTemplateSpecification` was not updated.
 *
 * @cloudformationResource AWS::Batch::ComputeEnvironment
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html
 */
class CfnComputeEnvironmentPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnComputeEnvironmentPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["computeEnvironmentName", "computeResources", "context", "eksConfiguration", "replaceComputeEnvironment", "serviceRole", "state", "tags", "type", "unmanagedvCpus", "updatePolicy"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::ComputeEnvironment`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnComputeEnvironmentMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnComputeEnvironmentPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnComputeEnvironmentMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnComputeEnvironment.isCfnComputeEnvironment(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnComputeEnvironmentPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnComputeEnvironmentPropsMixin = CfnComputeEnvironmentPropsMixin;
// @ts-ignore TS6133
function flattenCfnComputeEnvironmentPropsMixinLaunchTemplateSpecificationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        launchTemplateId: (!props.launchTemplateId ? undefined : cdk.getRefProperty(props.launchTemplateId?.launchTemplateRef, 'launchTemplateId') ?? cdk.ensureStringOrUndefined(props.launchTemplateId, "launchTemplateId", "ec2.ILaunchTemplateRef | string")),
        launchTemplateName: (!props.launchTemplateName ? undefined : props.launchTemplateName),
        overrides: (!props.overrides ? undefined : props.overrides),
        userdataType: (!props.userdataType ? undefined : props.userdataType),
        version: (!props.version ? undefined : props.version)
    };
}
// @ts-ignore TS6133
function flattenCfnComputeEnvironmentPropsMixinComputeResourcesProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        allocationStrategy: (!props.allocationStrategy ? undefined : props.allocationStrategy),
        bidPercentage: (!props.bidPercentage ? undefined : props.bidPercentage),
        desiredvCpus: (!props.desiredvCpus ? undefined : props.desiredvCpus),
        ec2Configuration: (!props.ec2Configuration ? undefined : props.ec2Configuration),
        ec2KeyPair: (!props.ec2KeyPair ? undefined : props.ec2KeyPair),
        imageId: (!props.imageId ? undefined : props.imageId),
        instanceRole: (!props.instanceRole ? undefined : cdk.getRefProperty(props.instanceRole?.instanceProfileRef, 'instanceProfileArn') ?? cdk.getRefProperty(props.instanceRole?.instanceProfileRef, 'instanceProfileName') ?? cdk.getRefProperty(props.instanceRole?.roleRef, 'roleName') ?? cdk.ensureStringOrUndefined(props.instanceRole, "instanceRole", "iam.IInstanceProfileRef | iam.IRoleRef | string")),
        instanceTypes: (!props.instanceTypes ? undefined : props.instanceTypes),
        launchTemplate: (!props.launchTemplate ? undefined : (!props.launchTemplate ? undefined : flattenCfnComputeEnvironmentPropsMixinLaunchTemplateSpecificationProperty(props.launchTemplate))),
        maxvCpus: (!props.maxvCpus ? undefined : props.maxvCpus),
        minvCpus: (!props.minvCpus ? undefined : props.minvCpus),
        placementGroup: (!props.placementGroup ? undefined : cdk.getRefProperty(props.placementGroup?.placementGroupRef, 'groupName') ?? cdk.ensureStringOrUndefined(props.placementGroup, "placementGroup", "ec2.IPlacementGroupRef | string")),
        scalingPolicy: (!props.scalingPolicy ? undefined : props.scalingPolicy),
        securityGroupIds: (!props.securityGroupIds ? undefined : cdk.mapArrayInPlace(props.securityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "securityGroupIds", "ec2.ISecurityGroupRef | string"))),
        spotIamFleetRole: (!props.spotIamFleetRole ? undefined : cdk.getRefProperty(props.spotIamFleetRole?.roleRef, 'roleName') ?? cdk.ensureStringOrUndefined(props.spotIamFleetRole, "spotIamFleetRole", "iam.IRoleRef | string")),
        subnets: (!props.subnets ? undefined : cdk.mapArrayInPlace(props.subnets, (item) => cdk.getRefProperty(item?.subnetRef, 'subnetId') ?? cdk.ensureStringOrUndefined(item, "subnets", "ec2.ISubnetRef | string"))),
        tags: (!props.tags ? undefined : props.tags),
        type: (!props.type ? undefined : props.type),
        updateToLatestImageVersion: (!props.updateToLatestImageVersion ? undefined : props.updateToLatestImageVersion)
    };
}
// @ts-ignore TS6133
function flattenCfnComputeEnvironmentMixinProps(props) {
    const ret = {};
    if ((props.computeResources !== undefined))
        ret.computeResources = flattenCfnComputeEnvironmentPropsMixinComputeResourcesProperty(props.computeResources);
    if ((props.serviceRole !== undefined))
        ret.serviceRole = cdk.getRefProperty(props.serviceRole?.roleRef, 'roleArn') ?? cdk.getRefProperty(props.serviceRole?.roleRef, 'roleName') ?? cdk.ensureStringOrUndefined(props.serviceRole, "serviceRole", "iam.IRoleRef | string");
    return ret;
}
/**
 * The `AWS::Batch::JobDefinition` resource specifies the parameters for an AWS Batch job definition.
 *
 * For more information, see [Job Definitions](https://docs.aws.amazon.com/batch/latest/userguide/job_definitions.html) in the ** .
 *
 * @cloudformationResource AWS::Batch::JobDefinition
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html
 */
class CfnJobDefinitionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnJobDefinitionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["consumableResourceProperties", "containerProperties", "ecsProperties", "eksProperties", "jobDefinitionName", "nodeProperties", "parameters", "platformCapabilities", "propagateTags", "resourceRetentionPolicy", "retryStrategy", "schedulingPriority", "tags", "timeout", "type"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::JobDefinition`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnJobDefinitionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnJobDefinitionPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnJobDefinition.isCfnJobDefinition(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnJobDefinitionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnJobDefinitionPropsMixin = CfnJobDefinitionPropsMixin;
/**
 * The `AWS::Batch::JobQueue` resource specifies the parameters for an AWS Batch job queue definition.
 *
 * For more information, see [Job Queues](https://docs.aws.amazon.com/batch/latest/userguide/job_queues.html) in the ** .
 *
 * @cloudformationResource AWS::Batch::JobQueue
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobqueue.html
 */
class CfnJobQueuePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnJobQueuePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["computeEnvironmentOrder", "jobQueueName", "jobQueueType", "jobStateTimeLimitActions", "priority", "schedulingPolicyArn", "serviceEnvironmentOrder", "state", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::JobQueue`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnJobQueueMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnJobQueuePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnJobQueueMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnJobQueue.isCfnJobQueue(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnJobQueuePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnJobQueuePropsMixin = CfnJobQueuePropsMixin;
// @ts-ignore TS6133
function flattenCfnJobQueuePropsMixinComputeEnvironmentOrderProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        computeEnvironment: (!props.computeEnvironment ? undefined : cdk.getRefProperty(props.computeEnvironment?.computeEnvironmentRef, 'computeEnvironmentArn') ?? cdk.ensureStringOrUndefined(props.computeEnvironment, "computeEnvironment", "batch.IComputeEnvironmentRef | string")),
        order: (!props.order ? undefined : props.order)
    };
}
// @ts-ignore TS6133
function flattenCfnJobQueueMixinProps(props) {
    const ret = {};
    if ((props.computeEnvironmentOrder !== undefined))
        ret.computeEnvironmentOrder = (cdk.isResolvableObject(props.computeEnvironmentOrder) ? props.computeEnvironmentOrder : cdk.mapArrayInPlace(props.computeEnvironmentOrder, (item) => flattenCfnJobQueuePropsMixinComputeEnvironmentOrderProperty(item)));
    if ((props.schedulingPolicyArn !== undefined))
        ret.schedulingPolicyArn = cdk.getRefProperty(props.schedulingPolicyArn?.schedulingPolicyRef, 'schedulingPolicyArn') ?? cdk.ensureStringOrUndefined(props.schedulingPolicyArn, "schedulingPolicyArn", "batch.ISchedulingPolicyRef | string");
    return ret;
}
/**
 * The `AWS::Batch::SchedulingPolicy` resource specifies the parameters for an AWS Batch scheduling policy.
 *
 * For more information, see [Scheduling Policies](https://docs.aws.amazon.com/batch/latest/userguide/scheduling_policies.html) in the ** .
 *
 * @cloudformationResource AWS::Batch::SchedulingPolicy
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-schedulingpolicy.html
 */
class CfnSchedulingPolicyPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnSchedulingPolicyPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["fairsharePolicy", "name", "quotaSharePolicy", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::SchedulingPolicy`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnSchedulingPolicyMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnSchedulingPolicyPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnSchedulingPolicy.isCfnSchedulingPolicy(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnSchedulingPolicyPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnSchedulingPolicyPropsMixin = CfnSchedulingPolicyPropsMixin;
/**
 * The `AWS::Batch::ConsumableResource` resource specifies the parameters for an AWS Batch consumable resource.
 *
 * For more information, see [Resource-aware scheduling](https://docs.aws.amazon.com/batch/latest/userguide/resource-aware-scheduling.html) in the ** .
 *
 * @cloudformationResource AWS::Batch::ConsumableResource
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-consumableresource.html
 */
class CfnConsumableResourcePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnConsumableResourcePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["consumableResourceName", "resourceType", "tags", "totalQuantity"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::ConsumableResource`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnConsumableResourceMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnConsumableResourcePropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnConsumableResource.isCfnConsumableResource(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnConsumableResourcePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnConsumableResourcePropsMixin = CfnConsumableResourcePropsMixin;
/**
 * Creates an AWS Batch quota share.
 *
 * Each quota share operates as a virtual queue with a configured compute capacity, resource sharing strategy, and borrow limits.
 *
 * @cloudformationResource AWS::Batch::QuotaShare
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-quotashare.html
 */
class CfnQuotaSharePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnQuotaSharePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["capacityLimits", "jobQueue", "preemptionConfiguration", "quotaShareName", "resourceSharingConfiguration", "state", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::QuotaShare`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnQuotaShareMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnQuotaSharePropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnQuotaShare.isCfnQuotaShare(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnQuotaSharePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnQuotaSharePropsMixin = CfnQuotaSharePropsMixin;
/**
 * Creates a service environment for running service jobs.
 *
 * Service environments define capacity limits for specific service types such as SageMaker Training jobs.
 *
 * @cloudformationResource AWS::Batch::ServiceEnvironment
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-serviceenvironment.html
 */
class CfnServiceEnvironmentPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_batch.CfnServiceEnvironmentPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["capacityLimits", "serviceEnvironmentName", "serviceEnvironmentType", "state", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Batch::ServiceEnvironment`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_batch_CfnServiceEnvironmentMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnServiceEnvironmentPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnServiceEnvironment.isCfnServiceEnvironment(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnServiceEnvironmentPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnServiceEnvironmentPropsMixin = CfnServiceEnvironmentPropsMixin;
