"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.CfnDataflowEndpointGroupV2PropsMixin = exports.CfnMissionProfilePropsMixin = exports.CfnDataflowEndpointGroupPropsMixin = exports.CfnConfigPropsMixin = 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-groundstation"));
/**
 * Creates a `Config` with the specified parameters.
 *
 * Config objects provide Ground Station with the details necessary in order to schedule and execute satellite contacts.
 *
 * @cloudformationResource AWS::GroundStation::Config
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-groundstation-config.html
 */
class CfnConfigPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_groundstation.CfnConfigPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["configData", "name", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::GroundStation::Config`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_groundstation_CfnConfigMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnConfigPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnConfigMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnConfig.isCfnConfig(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnConfigPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnConfigPropsMixin = CfnConfigPropsMixin;
// @ts-ignore TS6133
function flattenCfnConfigPropsMixinS3RecordingConfigProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bucketArn: (!props.bucketArn ? undefined : cdk.getRefProperty(props.bucketArn?.bucketRef, 'bucketArn') ?? cdk.ensureStringOrUndefined(props.bucketArn, "bucketArn", "s3.IBucketRef | string")),
        prefix: (!props.prefix ? undefined : props.prefix),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnConfigPropsMixinConfigDataProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        antennaDownlinkConfig: (!props.antennaDownlinkConfig ? undefined : props.antennaDownlinkConfig),
        antennaDownlinkDemodDecodeConfig: (!props.antennaDownlinkDemodDecodeConfig ? undefined : props.antennaDownlinkDemodDecodeConfig),
        antennaUplinkConfig: (!props.antennaUplinkConfig ? undefined : props.antennaUplinkConfig),
        dataflowEndpointConfig: (!props.dataflowEndpointConfig ? undefined : props.dataflowEndpointConfig),
        s3RecordingConfig: (!props.s3RecordingConfig ? undefined : (!props.s3RecordingConfig ? undefined : flattenCfnConfigPropsMixinS3RecordingConfigProperty(props.s3RecordingConfig))),
        telemetrySinkConfig: (!props.telemetrySinkConfig ? undefined : props.telemetrySinkConfig),
        trackingConfig: (!props.trackingConfig ? undefined : props.trackingConfig),
        uplinkEchoConfig: (!props.uplinkEchoConfig ? undefined : props.uplinkEchoConfig)
    };
}
// @ts-ignore TS6133
function flattenCfnConfigMixinProps(props) {
    const ret = {};
    if ((props.configData !== undefined))
        ret.configData = flattenCfnConfigPropsMixinConfigDataProperty(props.configData);
    return ret;
}
/**
 * Creates a Dataflow Endpoint Group request.
 *
 * Dataflow endpoint groups contain a list of endpoints. When the name of a dataflow endpoint group is specified in a mission profile, the Ground Station service will connect to the endpoints and flow data during a contact.
 *
 * For more information about dataflow endpoint groups, see [Dataflow Endpoint Groups](https://docs.aws.amazon.com/ground-station/latest/ug/dataflowendpointgroups.html) .
 *
 * @cloudformationResource AWS::GroundStation::DataflowEndpointGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-groundstation-dataflowendpointgroup.html
 */
class CfnDataflowEndpointGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_groundstation.CfnDataflowEndpointGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["contactPostPassDurationSeconds", "contactPrePassDurationSeconds", "endpointDetails", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::GroundStation::DataflowEndpointGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_groundstation_CfnDataflowEndpointGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDataflowEndpointGroupPropsMixin);
            }
            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.CfnDataflowEndpointGroup.isCfnDataflowEndpointGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDataflowEndpointGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDataflowEndpointGroupPropsMixin = CfnDataflowEndpointGroupPropsMixin;
/**
 * Mission profiles specify parameters and provide references to config objects to define how Ground Station lists and executes contacts.
 *
 * @cloudformationResource AWS::GroundStation::MissionProfile
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-groundstation-missionprofile.html
 */
class CfnMissionProfilePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_groundstation.CfnMissionProfilePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["contactPostPassDurationSeconds", "contactPrePassDurationSeconds", "dataflowEdges", "minimumViableContactDurationSeconds", "name", "streamsKmsKey", "streamsKmsRole", "tags", "telemetrySinkConfigArn", "trackingConfigArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::GroundStation::MissionProfile`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_groundstation_CfnMissionProfileMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnMissionProfilePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnMissionProfileMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnMissionProfile.isCfnMissionProfile(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnMissionProfilePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnMissionProfilePropsMixin = CfnMissionProfilePropsMixin;
// @ts-ignore TS6133
function flattenCfnMissionProfilePropsMixinDataflowEdgeProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        destination: (!props.destination ? undefined : cdk.getRefProperty(props.destination?.configRef, 'configArn') ?? cdk.ensureStringOrUndefined(props.destination, "destination", "groundstation.IConfigRef | string")),
        source: (!props.source ? undefined : cdk.getRefProperty(props.source?.configRef, 'configArn') ?? cdk.ensureStringOrUndefined(props.source, "source", "groundstation.IConfigRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnMissionProfileMixinProps(props) {
    const ret = {};
    if ((props.dataflowEdges !== undefined))
        ret.dataflowEdges = (cdk.isResolvableObject(props.dataflowEdges) ? props.dataflowEdges : cdk.mapArrayInPlace(props.dataflowEdges, (item) => flattenCfnMissionProfilePropsMixinDataflowEdgeProperty(item)));
    if ((props.trackingConfigArn !== undefined))
        ret.trackingConfigArn = cdk.getRefProperty(props.trackingConfigArn?.configRef, 'configArn') ?? cdk.ensureStringOrUndefined(props.trackingConfigArn, "trackingConfigArn", "groundstation.IConfigRef | string");
    return ret;
}
/**
 * Creates a `DataflowEndpoint` group containing the specified list of Ground Station Agent based endpoints.
 *
 * The `name` field in each endpoint is used in your mission profile `DataflowEndpointConfig` to specify which endpoints to use during a contact.
 *
 * When a contact uses multiple `DataflowEndpointConfig` objects, each `Config` must match a `DataflowEndpoint` in the same group.
 *
 * @cloudformationResource AWS::GroundStation::DataflowEndpointGroupV2
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-groundstation-dataflowendpointgroupv2.html
 */
class CfnDataflowEndpointGroupV2PropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_groundstation.CfnDataflowEndpointGroupV2PropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["contactPostPassDurationSeconds", "contactPrePassDurationSeconds", "endpoints", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::GroundStation::DataflowEndpointGroupV2`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_groundstation_CfnDataflowEndpointGroupV2MixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDataflowEndpointGroupV2PropsMixin);
            }
            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.CfnDataflowEndpointGroupV2.isCfnDataflowEndpointGroupV2(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDataflowEndpointGroupV2PropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDataflowEndpointGroupV2PropsMixin = CfnDataflowEndpointGroupV2PropsMixin;
