"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.CfnVectorBucketPolicyPropsMixin = exports.CfnVectorBucketPropsMixin = exports.CfnIndexPropsMixin = 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-s3vectors"));
/**
 * The `AWS::S3Vectors::Index` resource defines a vector index within an Amazon S3 vector bucket.
 *
 * For more information, see [Creating a vector index in a vector bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-create-index.html) in the *Amazon Simple Storage Service User Guide* .
 *
 * You must specify either `VectorBucketName` or `VectorBucketArn` to identify the bucket that contains the index.
 *
 * To control how AWS CloudFormation handles the vector index when the stack is deleted, you can set a deletion policy for your index. You can choose to *retain* the index or to *delete* the index. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) .
 *
 * - **Permissions** - The required permissions for CloudFormation to use are based on the operations that are performed on the stack.
 *
 * - Create
 *
 * - s3vectors:CreateIndex
 * - s3vectors:GetIndex
 * - Read
 *
 * - s3vectors:GetIndex
 * - Delete
 *
 * - s3vectors:DeleteIndex
 * - s3vectors:GetIndex
 * - List
 *
 * - s3vectors:ListIndexes
 *
 * @cloudformationResource AWS::S3Vectors::Index
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html
 */
class CfnIndexPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_s3vectors.CfnIndexPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["dataType", "dimension", "distanceMetric", "encryptionConfiguration", "indexName", "metadataConfiguration", "tags", "vectorBucketArn", "vectorBucketName"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::S3Vectors::Index`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_s3vectors_CfnIndexMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnIndexPropsMixin);
            }
            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.CfnIndex.isCfnIndex(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnIndexPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnIndexPropsMixin = CfnIndexPropsMixin;
/**
 * Defines an Amazon S3 vector bucket in the same AWS Region where you create the AWS CloudFormation stack.
 *
 * Vector buckets are specialized storage containers designed for storing and managing vector data used in machine learning and AI applications. They provide optimized storage and retrieval capabilities for high-dimensional vector data.
 *
 * To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to *retain* the bucket or to *delete* the bucket. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) .
 *
 * > You can only delete empty vector buckets. Deletion fails for buckets that have contents.
 *
 * - **Permissions** - The required permissions for CloudFormation to use are based on the operations that are performed on the stack.
 *
 * - Create
 *
 * - s3vectors:CreateVectorBucket
 * - s3vectors:GetVectorBucket
 * - kms:GenerateDataKey (if using KMS encryption)
 * - Read
 *
 * - s3vectors:GetVectorBucket
 * - kms:GenerateDataKey (if using KMS encryption)
 * - Delete
 *
 * - s3vectors:DeleteVectorBucket
 * - s3vectors:GetVectorBucket
 * - kms:GenerateDataKey (if using KMS encryption)
 * - List
 *
 * - s3vectors:ListVectorBuckets
 * - kms:GenerateDataKey (if using KMS encryption)
 *
 * @cloudformationResource AWS::S3Vectors::VectorBucket
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-vectorbucket.html
 */
class CfnVectorBucketPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_s3vectors.CfnVectorBucketPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["encryptionConfiguration", "tags", "vectorBucketName"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::S3Vectors::VectorBucket`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_s3vectors_CfnVectorBucketMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnVectorBucketPropsMixin);
            }
            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.CfnVectorBucket.isCfnVectorBucket(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnVectorBucketPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnVectorBucketPropsMixin = CfnVectorBucketPropsMixin;
/**
 * The `AWS::S3Vectors::VectorBucketPolicy` resource defines an Amazon S3 vector bucket policy to control access to an Amazon S3 vector bucket.
 *
 * Vector bucket policies are written in JSON and allow you to grant or deny permissions across all (or a subset of) objects within a vector bucket.
 *
 * You must specify either `VectorBucketName` or `VectorBucketArn` to identify the target bucket.
 *
 * To control how AWS CloudFormation handles the vector bucket policy when the stack is deleted, you can set a deletion policy for your policy. You can choose to *retain* the policy or to *delete* the policy. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) .
 *
 * - **Permissions** - The required permissions for CloudFormation to use are based on the operations that are performed on the stack.
 *
 * - Create
 *
 * - s3vectors:GetVectorBucketPolicy
 * - s3vectors:PutVectorBucketPolicy
 * - Read
 *
 * - s3vectors:GetVectorBucketPolicy
 * - Update
 *
 * - s3vectors:GetVectorBucketPolicy
 * - s3vectors:PutVectorBucketPolicy
 * - Delete
 *
 * - s3vectors:GetVectorBucketPolicy
 * - s3vectors:DeleteVectorBucketPolicy
 * - List
 *
 * - s3vectors:GetVectorBucketPolicy
 * - s3vectors:ListVectorBuckets
 *
 * @cloudformationResource AWS::S3Vectors::VectorBucketPolicy
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-vectorbucketpolicy.html
 */
class CfnVectorBucketPolicyPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_s3vectors.CfnVectorBucketPolicyPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["policy", "vectorBucketArn", "vectorBucketName"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::S3Vectors::VectorBucketPolicy`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_s3vectors_CfnVectorBucketPolicyMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnVectorBucketPolicyPropsMixin);
            }
            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.CfnVectorBucketPolicy.isCfnVectorBucketPolicy(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnVectorBucketPolicyPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnVectorBucketPolicyPropsMixin = CfnVectorBucketPolicyPropsMixin;
