// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function pinpointAppCampaignHookToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        lambda_function_name: cdktf.stringToTerraform(struct.lambdaFunctionName),
        mode: cdktf.stringToTerraform(struct.mode),
        web_url: cdktf.stringToTerraform(struct.webUrl),
    };
}
export class PinpointAppCampaignHookOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._lambdaFunctionName !== undefined) {
            hasAnyValues = true;
            internalValueResult.lambdaFunctionName = this._lambdaFunctionName;
        }
        if (this._mode !== undefined) {
            hasAnyValues = true;
            internalValueResult.mode = this._mode;
        }
        if (this._webUrl !== undefined) {
            hasAnyValues = true;
            internalValueResult.webUrl = this._webUrl;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._lambdaFunctionName = undefined;
            this._mode = undefined;
            this._webUrl = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._lambdaFunctionName = value.lambdaFunctionName;
            this._mode = value.mode;
            this._webUrl = value.webUrl;
        }
    }
    // lambda_function_name - computed: false, optional: true, required: false
    _lambdaFunctionName;
    get lambdaFunctionName() {
        return this.getStringAttribute('lambda_function_name');
    }
    set lambdaFunctionName(value) {
        this._lambdaFunctionName = value;
    }
    resetLambdaFunctionName() {
        this._lambdaFunctionName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lambdaFunctionNameInput() {
        return this._lambdaFunctionName;
    }
    // mode - computed: false, optional: true, required: false
    _mode;
    get mode() {
        return this.getStringAttribute('mode');
    }
    set mode(value) {
        this._mode = value;
    }
    resetMode() {
        this._mode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get modeInput() {
        return this._mode;
    }
    // web_url - computed: false, optional: true, required: false
    _webUrl;
    get webUrl() {
        return this.getStringAttribute('web_url');
    }
    set webUrl(value) {
        this._webUrl = value;
    }
    resetWebUrl() {
        this._webUrl = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get webUrlInput() {
        return this._webUrl;
    }
}
export function pinpointAppLimitsToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        daily: cdktf.numberToTerraform(struct.daily),
        maximum_duration: cdktf.numberToTerraform(struct.maximumDuration),
        messages_per_second: cdktf.numberToTerraform(struct.messagesPerSecond),
        total: cdktf.numberToTerraform(struct.total),
    };
}
export class PinpointAppLimitsOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._daily !== undefined) {
            hasAnyValues = true;
            internalValueResult.daily = this._daily;
        }
        if (this._maximumDuration !== undefined) {
            hasAnyValues = true;
            internalValueResult.maximumDuration = this._maximumDuration;
        }
        if (this._messagesPerSecond !== undefined) {
            hasAnyValues = true;
            internalValueResult.messagesPerSecond = this._messagesPerSecond;
        }
        if (this._total !== undefined) {
            hasAnyValues = true;
            internalValueResult.total = this._total;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._daily = undefined;
            this._maximumDuration = undefined;
            this._messagesPerSecond = undefined;
            this._total = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._daily = value.daily;
            this._maximumDuration = value.maximumDuration;
            this._messagesPerSecond = value.messagesPerSecond;
            this._total = value.total;
        }
    }
    // daily - computed: false, optional: true, required: false
    _daily;
    get daily() {
        return this.getNumberAttribute('daily');
    }
    set daily(value) {
        this._daily = value;
    }
    resetDaily() {
        this._daily = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dailyInput() {
        return this._daily;
    }
    // maximum_duration - computed: false, optional: true, required: false
    _maximumDuration;
    get maximumDuration() {
        return this.getNumberAttribute('maximum_duration');
    }
    set maximumDuration(value) {
        this._maximumDuration = value;
    }
    resetMaximumDuration() {
        this._maximumDuration = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maximumDurationInput() {
        return this._maximumDuration;
    }
    // messages_per_second - computed: false, optional: true, required: false
    _messagesPerSecond;
    get messagesPerSecond() {
        return this.getNumberAttribute('messages_per_second');
    }
    set messagesPerSecond(value) {
        this._messagesPerSecond = value;
    }
    resetMessagesPerSecond() {
        this._messagesPerSecond = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get messagesPerSecondInput() {
        return this._messagesPerSecond;
    }
    // total - computed: false, optional: true, required: false
    _total;
    get total() {
        return this.getNumberAttribute('total');
    }
    set total(value) {
        this._total = value;
    }
    resetTotal() {
        this._total = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get totalInput() {
        return this._total;
    }
}
export function pinpointAppQuietTimeToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        end: cdktf.stringToTerraform(struct.end),
        start: cdktf.stringToTerraform(struct.start),
    };
}
export class PinpointAppQuietTimeOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._end !== undefined) {
            hasAnyValues = true;
            internalValueResult.end = this._end;
        }
        if (this._start !== undefined) {
            hasAnyValues = true;
            internalValueResult.start = this._start;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._end = undefined;
            this._start = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._end = value.end;
            this._start = value.start;
        }
    }
    // end - computed: false, optional: true, required: false
    _end;
    get end() {
        return this.getStringAttribute('end');
    }
    set end(value) {
        this._end = value;
    }
    resetEnd() {
        this._end = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get endInput() {
        return this._end;
    }
    // start - computed: false, optional: true, required: false
    _start;
    get start() {
        return this.getStringAttribute('start');
    }
    set start(value) {
        this._start = value;
    }
    resetStart() {
        this._start = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get startInput() {
        return this._start;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/pinpoint_app aws_pinpoint_app}
*/
export class PinpointApp extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_pinpoint_app";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/pinpoint_app aws_pinpoint_app} Resource
    *
    * @param scope The scope in which to define this construct
    * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
    * @param options PinpointAppConfig = {}
    */
    constructor(scope, id, config = {}) {
        super(scope, id, {
            terraformResourceType: 'aws_pinpoint_app',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._namePrefix = config.namePrefix;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._campaignHook.internalValue = config.campaignHook;
        this._limits.internalValue = config.limits;
        this._quietTime.internalValue = config.quietTime;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // application_id - computed: true, optional: false, required: false
    get applicationId() {
        return this.getStringAttribute('application_id');
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: true, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // name_prefix - computed: false, optional: true, required: false
    _namePrefix;
    get namePrefix() {
        return this.getStringAttribute('name_prefix');
    }
    set namePrefix(value) {
        this._namePrefix = value;
    }
    resetNamePrefix() {
        this._namePrefix = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get namePrefixInput() {
        return this._namePrefix;
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // tags_all - computed: true, optional: true, required: false
    _tagsAll;
    get tagsAll() {
        return this.getStringMapAttribute('tags_all');
    }
    set tagsAll(value) {
        this._tagsAll = value;
    }
    resetTagsAll() {
        this._tagsAll = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsAllInput() {
        return this._tagsAll;
    }
    // campaign_hook - computed: false, optional: true, required: false
    _campaignHook = new PinpointAppCampaignHookOutputReference(this, "campaign_hook", true);
    get campaignHook() {
        return this._campaignHook;
    }
    putCampaignHook(value) {
        this._campaignHook.internalValue = value;
    }
    resetCampaignHook() {
        this._campaignHook.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get campaignHookInput() {
        return this._campaignHook.internalValue;
    }
    // limits - computed: false, optional: true, required: false
    _limits = new PinpointAppLimitsOutputReference(this, "limits", true);
    get limits() {
        return this._limits;
    }
    putLimits(value) {
        this._limits.internalValue = value;
    }
    resetLimits() {
        this._limits.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get limitsInput() {
        return this._limits.internalValue;
    }
    // quiet_time - computed: false, optional: true, required: false
    _quietTime = new PinpointAppQuietTimeOutputReference(this, "quiet_time", true);
    get quietTime() {
        return this._quietTime;
    }
    putQuietTime(value) {
        this._quietTime.internalValue = value;
    }
    resetQuietTime() {
        this._quietTime.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get quietTimeInput() {
        return this._quietTime.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            name_prefix: cdktf.stringToTerraform(this._namePrefix),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            campaign_hook: pinpointAppCampaignHookToTerraform(this._campaignHook.internalValue),
            limits: pinpointAppLimitsToTerraform(this._limits.internalValue),
            quiet_time: pinpointAppQuietTimeToTerraform(this._quietTime.internalValue),
        };
    }
}
//# sourceMappingURL=pinpoint-app.js.map