"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.CfnSolutionPropsMixin = exports.CfnSchemaPropsMixin = exports.CfnDatasetGroupPropsMixin = exports.CfnDatasetPropsMixin = 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-personalize"));
/**
 * Creates an empty dataset and adds it to the specified dataset group.
 *
 * Use [CreateDatasetImportJob](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html) to import your training data to a dataset.
 *
 * There are 5 types of datasets:
 *
 * - Item interactions
 * - Items
 * - Users
 * - Action interactions (you can't use CloudFormation to create an Action interactions dataset)
 * - Actions (you can't use CloudFormation to create an Actions dataset)
 *
 * Each dataset type has an associated schema with required field types. Only the `Item interactions` dataset is required in order to train a model (also referred to as creating a solution).
 *
 * A dataset can be in one of the following states:
 *
 * - CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
 * - DELETE PENDING > DELETE IN_PROGRESS
 *
 * To get the status of the dataset, call [DescribeDataset](https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDataset.html) .
 *
 * **Related APIs** - [CreateDatasetGroup](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html)
 * - [ListDatasets](https://docs.aws.amazon.com/personalize/latest/dg/API_ListDatasets.html)
 * - [DescribeDataset](https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDataset.html)
 * - [DeleteDataset](https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteDataset.html)
 *
 * @cloudformationResource AWS::Personalize::Dataset
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-personalize-dataset.html
 */
class CfnDatasetPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_personalize.CfnDatasetPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["datasetGroupArn", "datasetImportJob", "datasetType", "name", "schemaArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Personalize::Dataset`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_personalize_CfnDatasetMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDatasetPropsMixin);
            }
            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.CfnDataset.isCfnDataset(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDatasetPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDatasetPropsMixin = CfnDatasetPropsMixin;
/**
 * A dataset group is a collection of related datasets (Item interactions, Users, Items, Actions, Action interactions).
 *
 * You create a dataset group by calling [CreateDatasetGroup](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetGroup.html) . You then create a dataset and add it to a dataset group by calling [CreateDataset](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html) . The dataset group is used to create and train a solution by calling [CreateSolution](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html) . A dataset group can contain only one of each type of dataset.
 *
 * You can specify an AWS Key Management Service (KMS) key to encrypt the datasets in the group.
 *
 * @cloudformationResource AWS::Personalize::DatasetGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-personalize-datasetgroup.html
 */
class CfnDatasetGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_personalize.CfnDatasetGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["domain", "kmsKeyArn", "name", "roleArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Personalize::DatasetGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_personalize_CfnDatasetGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDatasetGroupPropsMixin);
            }
            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.CfnDatasetGroup.isCfnDatasetGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDatasetGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDatasetGroupPropsMixin = CfnDatasetGroupPropsMixin;
/**
 * Creates an Amazon Personalize schema from the specified schema string.
 *
 * The schema you create must be in Avro JSON format.
 *
 * Amazon Personalize recognizes three schema variants. Each schema is associated with a dataset type and has a set of required field and keywords. If you are creating a schema for a dataset in a Domain dataset group, you provide the domain of the Domain dataset group. You specify a schema when you call [CreateDataset](https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html) .
 *
 * For more information on schemas, see [Datasets and schemas](https://docs.aws.amazon.com/personalize/latest/dg/how-it-works-dataset-schema.html) .
 *
 * **Related APIs** - [ListSchemas](https://docs.aws.amazon.com/personalize/latest/dg/API_ListSchemas.html)
 * - [DescribeSchema](https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSchema.html)
 * - [DeleteSchema](https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteSchema.html)
 *
 * @cloudformationResource AWS::Personalize::Schema
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-personalize-schema.html
 */
class CfnSchemaPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_personalize.CfnSchemaPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["domain", "name", "schema"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Personalize::Schema`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_personalize_CfnSchemaMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnSchemaPropsMixin);
            }
            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.CfnSchema.isCfnSchema(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnSchemaPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnSchemaPropsMixin = CfnSchemaPropsMixin;
/**
 * > By default, all new solutions use automatic training.
 *
 * With automatic training, you incur training costs while your solution is active. To avoid unnecessary costs, when you are finished you can [update the solution](https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateSolution.html) to turn off automatic training. For information about training costs, see [Amazon Personalize pricing](https://docs.aws.amazon.com/https://aws.amazon.com/personalize/pricing/) .
 *
 * An object that provides information about a solution. A solution includes the custom recipe, customized parameters, and trained models (Solution Versions) that Amazon Personalize uses to generate recommendations.
 *
 * After you create a solution, you can’t change its configuration. If you need to make changes, you can [clone the solution](https://docs.aws.amazon.com/personalize/latest/dg/cloning-solution.html) with the Amazon Personalize console or create a new one.
 *
 * @cloudformationResource AWS::Personalize::Solution
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-personalize-solution.html
 */
class CfnSolutionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_personalize.CfnSolutionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["datasetGroupArn", "eventType", "name", "performAutoMl", "performHpo", "recipeArn", "solutionConfig"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Personalize::Solution`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_personalize_CfnSolutionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnSolutionPropsMixin);
            }
            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.CfnSolution.isCfnSolution(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnSolutionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnSolutionPropsMixin = CfnSolutionPropsMixin;
