// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function iotTopicRuleCloudwatchAlarmToTerraform(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 {
        alarm_name: cdktf.stringToTerraform(struct.alarmName),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        state_reason: cdktf.stringToTerraform(struct.stateReason),
        state_value: cdktf.stringToTerraform(struct.stateValue),
    };
}
export function iotTopicRuleCloudwatchMetricToTerraform(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 {
        metric_name: cdktf.stringToTerraform(struct.metricName),
        metric_namespace: cdktf.stringToTerraform(struct.metricNamespace),
        metric_timestamp: cdktf.stringToTerraform(struct.metricTimestamp),
        metric_unit: cdktf.stringToTerraform(struct.metricUnit),
        metric_value: cdktf.stringToTerraform(struct.metricValue),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export function iotTopicRuleDynamodbToTerraform(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 {
        hash_key_field: cdktf.stringToTerraform(struct.hashKeyField),
        hash_key_type: cdktf.stringToTerraform(struct.hashKeyType),
        hash_key_value: cdktf.stringToTerraform(struct.hashKeyValue),
        operation: cdktf.stringToTerraform(struct.operation),
        payload_field: cdktf.stringToTerraform(struct.payloadField),
        range_key_field: cdktf.stringToTerraform(struct.rangeKeyField),
        range_key_type: cdktf.stringToTerraform(struct.rangeKeyType),
        range_key_value: cdktf.stringToTerraform(struct.rangeKeyValue),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        table_name: cdktf.stringToTerraform(struct.tableName),
    };
}
export function iotTopicRuleDynamodbv2PutItemToTerraform(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 {
        table_name: cdktf.stringToTerraform(struct.tableName),
    };
}
export class IotTopicRuleDynamodbv2PutItemOutputReference 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._tableName !== undefined) {
            hasAnyValues = true;
            internalValueResult.tableName = this._tableName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._tableName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._tableName = value.tableName;
        }
    }
    // table_name - computed: false, optional: false, required: true
    _tableName;
    get tableName() {
        return this.getStringAttribute('table_name');
    }
    set tableName(value) {
        this._tableName = value;
    }
    // Temporarily expose input value. Use with caution.
    get tableNameInput() {
        return this._tableName;
    }
}
export function iotTopicRuleDynamodbv2ToTerraform(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 {
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        put_item: iotTopicRuleDynamodbv2PutItemToTerraform(struct.putItem),
    };
}
export function iotTopicRuleElasticsearchToTerraform(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 {
        endpoint: cdktf.stringToTerraform(struct.endpoint),
        id: cdktf.stringToTerraform(struct.id),
        index: cdktf.stringToTerraform(struct.index),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export function iotTopicRuleErrorActionCloudwatchAlarmToTerraform(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 {
        alarm_name: cdktf.stringToTerraform(struct.alarmName),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        state_reason: cdktf.stringToTerraform(struct.stateReason),
        state_value: cdktf.stringToTerraform(struct.stateValue),
    };
}
export class IotTopicRuleErrorActionCloudwatchAlarmOutputReference 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._alarmName !== undefined) {
            hasAnyValues = true;
            internalValueResult.alarmName = this._alarmName;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._stateReason !== undefined) {
            hasAnyValues = true;
            internalValueResult.stateReason = this._stateReason;
        }
        if (this._stateValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.stateValue = this._stateValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._alarmName = undefined;
            this._roleArn = undefined;
            this._stateReason = undefined;
            this._stateValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._alarmName = value.alarmName;
            this._roleArn = value.roleArn;
            this._stateReason = value.stateReason;
            this._stateValue = value.stateValue;
        }
    }
    // alarm_name - computed: false, optional: false, required: true
    _alarmName;
    get alarmName() {
        return this.getStringAttribute('alarm_name');
    }
    set alarmName(value) {
        this._alarmName = value;
    }
    // Temporarily expose input value. Use with caution.
    get alarmNameInput() {
        return this._alarmName;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // state_reason - computed: false, optional: false, required: true
    _stateReason;
    get stateReason() {
        return this.getStringAttribute('state_reason');
    }
    set stateReason(value) {
        this._stateReason = value;
    }
    // Temporarily expose input value. Use with caution.
    get stateReasonInput() {
        return this._stateReason;
    }
    // state_value - computed: false, optional: false, required: true
    _stateValue;
    get stateValue() {
        return this.getStringAttribute('state_value');
    }
    set stateValue(value) {
        this._stateValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get stateValueInput() {
        return this._stateValue;
    }
}
export function iotTopicRuleErrorActionCloudwatchMetricToTerraform(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 {
        metric_name: cdktf.stringToTerraform(struct.metricName),
        metric_namespace: cdktf.stringToTerraform(struct.metricNamespace),
        metric_timestamp: cdktf.stringToTerraform(struct.metricTimestamp),
        metric_unit: cdktf.stringToTerraform(struct.metricUnit),
        metric_value: cdktf.stringToTerraform(struct.metricValue),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export class IotTopicRuleErrorActionCloudwatchMetricOutputReference 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._metricName !== undefined) {
            hasAnyValues = true;
            internalValueResult.metricName = this._metricName;
        }
        if (this._metricNamespace !== undefined) {
            hasAnyValues = true;
            internalValueResult.metricNamespace = this._metricNamespace;
        }
        if (this._metricTimestamp !== undefined) {
            hasAnyValues = true;
            internalValueResult.metricTimestamp = this._metricTimestamp;
        }
        if (this._metricUnit !== undefined) {
            hasAnyValues = true;
            internalValueResult.metricUnit = this._metricUnit;
        }
        if (this._metricValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.metricValue = this._metricValue;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._metricName = undefined;
            this._metricNamespace = undefined;
            this._metricTimestamp = undefined;
            this._metricUnit = undefined;
            this._metricValue = undefined;
            this._roleArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._metricName = value.metricName;
            this._metricNamespace = value.metricNamespace;
            this._metricTimestamp = value.metricTimestamp;
            this._metricUnit = value.metricUnit;
            this._metricValue = value.metricValue;
            this._roleArn = value.roleArn;
        }
    }
    // metric_name - computed: false, optional: false, required: true
    _metricName;
    get metricName() {
        return this.getStringAttribute('metric_name');
    }
    set metricName(value) {
        this._metricName = value;
    }
    // Temporarily expose input value. Use with caution.
    get metricNameInput() {
        return this._metricName;
    }
    // metric_namespace - computed: false, optional: false, required: true
    _metricNamespace;
    get metricNamespace() {
        return this.getStringAttribute('metric_namespace');
    }
    set metricNamespace(value) {
        this._metricNamespace = value;
    }
    // Temporarily expose input value. Use with caution.
    get metricNamespaceInput() {
        return this._metricNamespace;
    }
    // metric_timestamp - computed: false, optional: true, required: false
    _metricTimestamp;
    get metricTimestamp() {
        return this.getStringAttribute('metric_timestamp');
    }
    set metricTimestamp(value) {
        this._metricTimestamp = value;
    }
    resetMetricTimestamp() {
        this._metricTimestamp = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get metricTimestampInput() {
        return this._metricTimestamp;
    }
    // metric_unit - computed: false, optional: false, required: true
    _metricUnit;
    get metricUnit() {
        return this.getStringAttribute('metric_unit');
    }
    set metricUnit(value) {
        this._metricUnit = value;
    }
    // Temporarily expose input value. Use with caution.
    get metricUnitInput() {
        return this._metricUnit;
    }
    // metric_value - computed: false, optional: false, required: true
    _metricValue;
    get metricValue() {
        return this.getStringAttribute('metric_value');
    }
    set metricValue(value) {
        this._metricValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get metricValueInput() {
        return this._metricValue;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
}
export function iotTopicRuleErrorActionDynamodbToTerraform(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 {
        hash_key_field: cdktf.stringToTerraform(struct.hashKeyField),
        hash_key_type: cdktf.stringToTerraform(struct.hashKeyType),
        hash_key_value: cdktf.stringToTerraform(struct.hashKeyValue),
        operation: cdktf.stringToTerraform(struct.operation),
        payload_field: cdktf.stringToTerraform(struct.payloadField),
        range_key_field: cdktf.stringToTerraform(struct.rangeKeyField),
        range_key_type: cdktf.stringToTerraform(struct.rangeKeyType),
        range_key_value: cdktf.stringToTerraform(struct.rangeKeyValue),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        table_name: cdktf.stringToTerraform(struct.tableName),
    };
}
export class IotTopicRuleErrorActionDynamodbOutputReference 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._hashKeyField !== undefined) {
            hasAnyValues = true;
            internalValueResult.hashKeyField = this._hashKeyField;
        }
        if (this._hashKeyType !== undefined) {
            hasAnyValues = true;
            internalValueResult.hashKeyType = this._hashKeyType;
        }
        if (this._hashKeyValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.hashKeyValue = this._hashKeyValue;
        }
        if (this._operation !== undefined) {
            hasAnyValues = true;
            internalValueResult.operation = this._operation;
        }
        if (this._payloadField !== undefined) {
            hasAnyValues = true;
            internalValueResult.payloadField = this._payloadField;
        }
        if (this._rangeKeyField !== undefined) {
            hasAnyValues = true;
            internalValueResult.rangeKeyField = this._rangeKeyField;
        }
        if (this._rangeKeyType !== undefined) {
            hasAnyValues = true;
            internalValueResult.rangeKeyType = this._rangeKeyType;
        }
        if (this._rangeKeyValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.rangeKeyValue = this._rangeKeyValue;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._tableName !== undefined) {
            hasAnyValues = true;
            internalValueResult.tableName = this._tableName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._hashKeyField = undefined;
            this._hashKeyType = undefined;
            this._hashKeyValue = undefined;
            this._operation = undefined;
            this._payloadField = undefined;
            this._rangeKeyField = undefined;
            this._rangeKeyType = undefined;
            this._rangeKeyValue = undefined;
            this._roleArn = undefined;
            this._tableName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._hashKeyField = value.hashKeyField;
            this._hashKeyType = value.hashKeyType;
            this._hashKeyValue = value.hashKeyValue;
            this._operation = value.operation;
            this._payloadField = value.payloadField;
            this._rangeKeyField = value.rangeKeyField;
            this._rangeKeyType = value.rangeKeyType;
            this._rangeKeyValue = value.rangeKeyValue;
            this._roleArn = value.roleArn;
            this._tableName = value.tableName;
        }
    }
    // hash_key_field - computed: false, optional: false, required: true
    _hashKeyField;
    get hashKeyField() {
        return this.getStringAttribute('hash_key_field');
    }
    set hashKeyField(value) {
        this._hashKeyField = value;
    }
    // Temporarily expose input value. Use with caution.
    get hashKeyFieldInput() {
        return this._hashKeyField;
    }
    // hash_key_type - computed: false, optional: true, required: false
    _hashKeyType;
    get hashKeyType() {
        return this.getStringAttribute('hash_key_type');
    }
    set hashKeyType(value) {
        this._hashKeyType = value;
    }
    resetHashKeyType() {
        this._hashKeyType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get hashKeyTypeInput() {
        return this._hashKeyType;
    }
    // hash_key_value - computed: false, optional: false, required: true
    _hashKeyValue;
    get hashKeyValue() {
        return this.getStringAttribute('hash_key_value');
    }
    set hashKeyValue(value) {
        this._hashKeyValue = value;
    }
    // Temporarily expose input value. Use with caution.
    get hashKeyValueInput() {
        return this._hashKeyValue;
    }
    // operation - computed: false, optional: true, required: false
    _operation;
    get operation() {
        return this.getStringAttribute('operation');
    }
    set operation(value) {
        this._operation = value;
    }
    resetOperation() {
        this._operation = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get operationInput() {
        return this._operation;
    }
    // payload_field - computed: false, optional: true, required: false
    _payloadField;
    get payloadField() {
        return this.getStringAttribute('payload_field');
    }
    set payloadField(value) {
        this._payloadField = value;
    }
    resetPayloadField() {
        this._payloadField = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get payloadFieldInput() {
        return this._payloadField;
    }
    // range_key_field - computed: false, optional: true, required: false
    _rangeKeyField;
    get rangeKeyField() {
        return this.getStringAttribute('range_key_field');
    }
    set rangeKeyField(value) {
        this._rangeKeyField = value;
    }
    resetRangeKeyField() {
        this._rangeKeyField = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get rangeKeyFieldInput() {
        return this._rangeKeyField;
    }
    // range_key_type - computed: false, optional: true, required: false
    _rangeKeyType;
    get rangeKeyType() {
        return this.getStringAttribute('range_key_type');
    }
    set rangeKeyType(value) {
        this._rangeKeyType = value;
    }
    resetRangeKeyType() {
        this._rangeKeyType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get rangeKeyTypeInput() {
        return this._rangeKeyType;
    }
    // range_key_value - computed: false, optional: true, required: false
    _rangeKeyValue;
    get rangeKeyValue() {
        return this.getStringAttribute('range_key_value');
    }
    set rangeKeyValue(value) {
        this._rangeKeyValue = value;
    }
    resetRangeKeyValue() {
        this._rangeKeyValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get rangeKeyValueInput() {
        return this._rangeKeyValue;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // table_name - computed: false, optional: false, required: true
    _tableName;
    get tableName() {
        return this.getStringAttribute('table_name');
    }
    set tableName(value) {
        this._tableName = value;
    }
    // Temporarily expose input value. Use with caution.
    get tableNameInput() {
        return this._tableName;
    }
}
export function iotTopicRuleErrorActionDynamodbv2PutItemToTerraform(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 {
        table_name: cdktf.stringToTerraform(struct.tableName),
    };
}
export class IotTopicRuleErrorActionDynamodbv2PutItemOutputReference 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._tableName !== undefined) {
            hasAnyValues = true;
            internalValueResult.tableName = this._tableName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._tableName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._tableName = value.tableName;
        }
    }
    // table_name - computed: false, optional: false, required: true
    _tableName;
    get tableName() {
        return this.getStringAttribute('table_name');
    }
    set tableName(value) {
        this._tableName = value;
    }
    // Temporarily expose input value. Use with caution.
    get tableNameInput() {
        return this._tableName;
    }
}
export function iotTopicRuleErrorActionDynamodbv2ToTerraform(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 {
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        put_item: iotTopicRuleErrorActionDynamodbv2PutItemToTerraform(struct.putItem),
    };
}
export class IotTopicRuleErrorActionDynamodbv2OutputReference 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._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._putItem?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.putItem = this._putItem?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._roleArn = undefined;
            this._putItem.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._roleArn = value.roleArn;
            this._putItem.internalValue = value.putItem;
        }
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // put_item - computed: false, optional: true, required: false
    _putItem = new IotTopicRuleErrorActionDynamodbv2PutItemOutputReference(this, "put_item", true);
    get putItem() {
        return this._putItem;
    }
    putPutItem(value) {
        this._putItem.internalValue = value;
    }
    resetPutItem() {
        this._putItem.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get putItemInput() {
        return this._putItem.internalValue;
    }
}
export function iotTopicRuleErrorActionElasticsearchToTerraform(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 {
        endpoint: cdktf.stringToTerraform(struct.endpoint),
        id: cdktf.stringToTerraform(struct.id),
        index: cdktf.stringToTerraform(struct.index),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export class IotTopicRuleErrorActionElasticsearchOutputReference 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._endpoint !== undefined) {
            hasAnyValues = true;
            internalValueResult.endpoint = this._endpoint;
        }
        if (this._id !== undefined) {
            hasAnyValues = true;
            internalValueResult.id = this._id;
        }
        if (this._index !== undefined) {
            hasAnyValues = true;
            internalValueResult.index = this._index;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._type !== undefined) {
            hasAnyValues = true;
            internalValueResult.type = this._type;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._endpoint = undefined;
            this._id = undefined;
            this._index = undefined;
            this._roleArn = undefined;
            this._type = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._endpoint = value.endpoint;
            this._id = value.id;
            this._index = value.index;
            this._roleArn = value.roleArn;
            this._type = value.type;
        }
    }
    // endpoint - computed: false, optional: false, required: true
    _endpoint;
    get endpoint() {
        return this.getStringAttribute('endpoint');
    }
    set endpoint(value) {
        this._endpoint = value;
    }
    // Temporarily expose input value. Use with caution.
    get endpointInput() {
        return this._endpoint;
    }
    // id - computed: false, optional: false, required: true
    _id;
    get id() {
        return this.getStringAttribute('id');
    }
    set id(value) {
        this._id = value;
    }
    // Temporarily expose input value. Use with caution.
    get idInput() {
        return this._id;
    }
    // index - computed: false, optional: false, required: true
    _index;
    get index() {
        return this.getStringAttribute('index');
    }
    set index(value) {
        this._index = value;
    }
    // Temporarily expose input value. Use with caution.
    get indexInput() {
        return this._index;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // type - computed: false, optional: false, required: true
    _type;
    get type() {
        return this.getStringAttribute('type');
    }
    set type(value) {
        this._type = value;
    }
    // Temporarily expose input value. Use with caution.
    get typeInput() {
        return this._type;
    }
}
export function iotTopicRuleErrorActionFirehoseToTerraform(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 {
        delivery_stream_name: cdktf.stringToTerraform(struct.deliveryStreamName),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        separator: cdktf.stringToTerraform(struct.separator),
    };
}
export class IotTopicRuleErrorActionFirehoseOutputReference 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._deliveryStreamName !== undefined) {
            hasAnyValues = true;
            internalValueResult.deliveryStreamName = this._deliveryStreamName;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._separator !== undefined) {
            hasAnyValues = true;
            internalValueResult.separator = this._separator;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._deliveryStreamName = undefined;
            this._roleArn = undefined;
            this._separator = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._deliveryStreamName = value.deliveryStreamName;
            this._roleArn = value.roleArn;
            this._separator = value.separator;
        }
    }
    // delivery_stream_name - computed: false, optional: false, required: true
    _deliveryStreamName;
    get deliveryStreamName() {
        return this.getStringAttribute('delivery_stream_name');
    }
    set deliveryStreamName(value) {
        this._deliveryStreamName = value;
    }
    // Temporarily expose input value. Use with caution.
    get deliveryStreamNameInput() {
        return this._deliveryStreamName;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // separator - computed: false, optional: true, required: false
    _separator;
    get separator() {
        return this.getStringAttribute('separator');
    }
    set separator(value) {
        this._separator = value;
    }
    resetSeparator() {
        this._separator = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get separatorInput() {
        return this._separator;
    }
}
export function iotTopicRuleErrorActionIotAnalyticsToTerraform(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 {
        channel_name: cdktf.stringToTerraform(struct.channelName),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export class IotTopicRuleErrorActionIotAnalyticsOutputReference 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._channelName !== undefined) {
            hasAnyValues = true;
            internalValueResult.channelName = this._channelName;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._channelName = undefined;
            this._roleArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._channelName = value.channelName;
            this._roleArn = value.roleArn;
        }
    }
    // channel_name - computed: false, optional: false, required: true
    _channelName;
    get channelName() {
        return this.getStringAttribute('channel_name');
    }
    set channelName(value) {
        this._channelName = value;
    }
    // Temporarily expose input value. Use with caution.
    get channelNameInput() {
        return this._channelName;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
}
export function iotTopicRuleErrorActionIotEventsToTerraform(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 {
        input_name: cdktf.stringToTerraform(struct.inputName),
        message_id: cdktf.stringToTerraform(struct.messageId),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export class IotTopicRuleErrorActionIotEventsOutputReference 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._inputName !== undefined) {
            hasAnyValues = true;
            internalValueResult.inputName = this._inputName;
        }
        if (this._messageId !== undefined) {
            hasAnyValues = true;
            internalValueResult.messageId = this._messageId;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._inputName = undefined;
            this._messageId = undefined;
            this._roleArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._inputName = value.inputName;
            this._messageId = value.messageId;
            this._roleArn = value.roleArn;
        }
    }
    // input_name - computed: false, optional: false, required: true
    _inputName;
    get inputName() {
        return this.getStringAttribute('input_name');
    }
    set inputName(value) {
        this._inputName = value;
    }
    // Temporarily expose input value. Use with caution.
    get inputNameInput() {
        return this._inputName;
    }
    // message_id - computed: false, optional: true, required: false
    _messageId;
    get messageId() {
        return this.getStringAttribute('message_id');
    }
    set messageId(value) {
        this._messageId = value;
    }
    resetMessageId() {
        this._messageId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get messageIdInput() {
        return this._messageId;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
}
export function iotTopicRuleErrorActionKinesisToTerraform(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 {
        partition_key: cdktf.stringToTerraform(struct.partitionKey),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        stream_name: cdktf.stringToTerraform(struct.streamName),
    };
}
export class IotTopicRuleErrorActionKinesisOutputReference 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._partitionKey !== undefined) {
            hasAnyValues = true;
            internalValueResult.partitionKey = this._partitionKey;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._streamName !== undefined) {
            hasAnyValues = true;
            internalValueResult.streamName = this._streamName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._partitionKey = undefined;
            this._roleArn = undefined;
            this._streamName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._partitionKey = value.partitionKey;
            this._roleArn = value.roleArn;
            this._streamName = value.streamName;
        }
    }
    // partition_key - computed: false, optional: true, required: false
    _partitionKey;
    get partitionKey() {
        return this.getStringAttribute('partition_key');
    }
    set partitionKey(value) {
        this._partitionKey = value;
    }
    resetPartitionKey() {
        this._partitionKey = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get partitionKeyInput() {
        return this._partitionKey;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // stream_name - computed: false, optional: false, required: true
    _streamName;
    get streamName() {
        return this.getStringAttribute('stream_name');
    }
    set streamName(value) {
        this._streamName = value;
    }
    // Temporarily expose input value. Use with caution.
    get streamNameInput() {
        return this._streamName;
    }
}
export function iotTopicRuleErrorActionLambdaToTerraform(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 {
        function_arn: cdktf.stringToTerraform(struct.functionArn),
    };
}
export class IotTopicRuleErrorActionLambdaOutputReference 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._functionArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.functionArn = this._functionArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._functionArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._functionArn = value.functionArn;
        }
    }
    // function_arn - computed: false, optional: false, required: true
    _functionArn;
    get functionArn() {
        return this.getStringAttribute('function_arn');
    }
    set functionArn(value) {
        this._functionArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get functionArnInput() {
        return this._functionArn;
    }
}
export function iotTopicRuleErrorActionRepublishToTerraform(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 {
        qos: cdktf.numberToTerraform(struct.qos),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        topic: cdktf.stringToTerraform(struct.topic),
    };
}
export class IotTopicRuleErrorActionRepublishOutputReference 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._qos !== undefined) {
            hasAnyValues = true;
            internalValueResult.qos = this._qos;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._topic !== undefined) {
            hasAnyValues = true;
            internalValueResult.topic = this._topic;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._qos = undefined;
            this._roleArn = undefined;
            this._topic = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._qos = value.qos;
            this._roleArn = value.roleArn;
            this._topic = value.topic;
        }
    }
    // qos - computed: false, optional: true, required: false
    _qos;
    get qos() {
        return this.getNumberAttribute('qos');
    }
    set qos(value) {
        this._qos = value;
    }
    resetQos() {
        this._qos = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get qosInput() {
        return this._qos;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // topic - computed: false, optional: false, required: true
    _topic;
    get topic() {
        return this.getStringAttribute('topic');
    }
    set topic(value) {
        this._topic = value;
    }
    // Temporarily expose input value. Use with caution.
    get topicInput() {
        return this._topic;
    }
}
export function iotTopicRuleErrorActionS3ToTerraform(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 {
        bucket_name: cdktf.stringToTerraform(struct.bucketName),
        key: cdktf.stringToTerraform(struct.key),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export class IotTopicRuleErrorActionS3OutputReference 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._bucketName !== undefined) {
            hasAnyValues = true;
            internalValueResult.bucketName = this._bucketName;
        }
        if (this._key !== undefined) {
            hasAnyValues = true;
            internalValueResult.key = this._key;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bucketName = undefined;
            this._key = undefined;
            this._roleArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bucketName = value.bucketName;
            this._key = value.key;
            this._roleArn = value.roleArn;
        }
    }
    // bucket_name - computed: false, optional: false, required: true
    _bucketName;
    get bucketName() {
        return this.getStringAttribute('bucket_name');
    }
    set bucketName(value) {
        this._bucketName = value;
    }
    // Temporarily expose input value. Use with caution.
    get bucketNameInput() {
        return this._bucketName;
    }
    // key - computed: false, optional: false, required: true
    _key;
    get key() {
        return this.getStringAttribute('key');
    }
    set key(value) {
        this._key = value;
    }
    // Temporarily expose input value. Use with caution.
    get keyInput() {
        return this._key;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
}
export function iotTopicRuleErrorActionSnsToTerraform(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 {
        message_format: cdktf.stringToTerraform(struct.messageFormat),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        target_arn: cdktf.stringToTerraform(struct.targetArn),
    };
}
export class IotTopicRuleErrorActionSnsOutputReference 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._messageFormat !== undefined) {
            hasAnyValues = true;
            internalValueResult.messageFormat = this._messageFormat;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._targetArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.targetArn = this._targetArn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._messageFormat = undefined;
            this._roleArn = undefined;
            this._targetArn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._messageFormat = value.messageFormat;
            this._roleArn = value.roleArn;
            this._targetArn = value.targetArn;
        }
    }
    // message_format - computed: false, optional: true, required: false
    _messageFormat;
    get messageFormat() {
        return this.getStringAttribute('message_format');
    }
    set messageFormat(value) {
        this._messageFormat = value;
    }
    resetMessageFormat() {
        this._messageFormat = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get messageFormatInput() {
        return this._messageFormat;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // target_arn - computed: false, optional: false, required: true
    _targetArn;
    get targetArn() {
        return this.getStringAttribute('target_arn');
    }
    set targetArn(value) {
        this._targetArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get targetArnInput() {
        return this._targetArn;
    }
}
export function iotTopicRuleErrorActionSqsToTerraform(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 {
        queue_url: cdktf.stringToTerraform(struct.queueUrl),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        use_base64: cdktf.booleanToTerraform(struct.useBase64),
    };
}
export class IotTopicRuleErrorActionSqsOutputReference 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._queueUrl !== undefined) {
            hasAnyValues = true;
            internalValueResult.queueUrl = this._queueUrl;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._useBase64 !== undefined) {
            hasAnyValues = true;
            internalValueResult.useBase64 = this._useBase64;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._queueUrl = undefined;
            this._roleArn = undefined;
            this._useBase64 = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._queueUrl = value.queueUrl;
            this._roleArn = value.roleArn;
            this._useBase64 = value.useBase64;
        }
    }
    // queue_url - computed: false, optional: false, required: true
    _queueUrl;
    get queueUrl() {
        return this.getStringAttribute('queue_url');
    }
    set queueUrl(value) {
        this._queueUrl = value;
    }
    // Temporarily expose input value. Use with caution.
    get queueUrlInput() {
        return this._queueUrl;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // use_base64 - computed: false, optional: false, required: true
    _useBase64;
    get useBase64() {
        return this.getBooleanAttribute('use_base64');
    }
    set useBase64(value) {
        this._useBase64 = value;
    }
    // Temporarily expose input value. Use with caution.
    get useBase64Input() {
        return this._useBase64;
    }
}
export function iotTopicRuleErrorActionStepFunctionsToTerraform(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 {
        execution_name_prefix: cdktf.stringToTerraform(struct.executionNamePrefix),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        state_machine_name: cdktf.stringToTerraform(struct.stateMachineName),
    };
}
export class IotTopicRuleErrorActionStepFunctionsOutputReference 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._executionNamePrefix !== undefined) {
            hasAnyValues = true;
            internalValueResult.executionNamePrefix = this._executionNamePrefix;
        }
        if (this._roleArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.roleArn = this._roleArn;
        }
        if (this._stateMachineName !== undefined) {
            hasAnyValues = true;
            internalValueResult.stateMachineName = this._stateMachineName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._executionNamePrefix = undefined;
            this._roleArn = undefined;
            this._stateMachineName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._executionNamePrefix = value.executionNamePrefix;
            this._roleArn = value.roleArn;
            this._stateMachineName = value.stateMachineName;
        }
    }
    // execution_name_prefix - computed: false, optional: true, required: false
    _executionNamePrefix;
    get executionNamePrefix() {
        return this.getStringAttribute('execution_name_prefix');
    }
    set executionNamePrefix(value) {
        this._executionNamePrefix = value;
    }
    resetExecutionNamePrefix() {
        this._executionNamePrefix = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get executionNamePrefixInput() {
        return this._executionNamePrefix;
    }
    // role_arn - computed: false, optional: false, required: true
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // state_machine_name - computed: false, optional: false, required: true
    _stateMachineName;
    get stateMachineName() {
        return this.getStringAttribute('state_machine_name');
    }
    set stateMachineName(value) {
        this._stateMachineName = value;
    }
    // Temporarily expose input value. Use with caution.
    get stateMachineNameInput() {
        return this._stateMachineName;
    }
}
export function iotTopicRuleErrorActionToTerraform(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 {
        cloudwatch_alarm: iotTopicRuleErrorActionCloudwatchAlarmToTerraform(struct.cloudwatchAlarm),
        cloudwatch_metric: iotTopicRuleErrorActionCloudwatchMetricToTerraform(struct.cloudwatchMetric),
        dynamodb: iotTopicRuleErrorActionDynamodbToTerraform(struct.dynamodb),
        dynamodbv2: iotTopicRuleErrorActionDynamodbv2ToTerraform(struct.dynamodbv2),
        elasticsearch: iotTopicRuleErrorActionElasticsearchToTerraform(struct.elasticsearch),
        firehose: iotTopicRuleErrorActionFirehoseToTerraform(struct.firehose),
        iot_analytics: iotTopicRuleErrorActionIotAnalyticsToTerraform(struct.iotAnalytics),
        iot_events: iotTopicRuleErrorActionIotEventsToTerraform(struct.iotEvents),
        kinesis: iotTopicRuleErrorActionKinesisToTerraform(struct.kinesis),
        lambda: iotTopicRuleErrorActionLambdaToTerraform(struct.lambda),
        republish: iotTopicRuleErrorActionRepublishToTerraform(struct.republish),
        s3: iotTopicRuleErrorActionS3ToTerraform(struct.s3),
        sns: iotTopicRuleErrorActionSnsToTerraform(struct.sns),
        sqs: iotTopicRuleErrorActionSqsToTerraform(struct.sqs),
        step_functions: iotTopicRuleErrorActionStepFunctionsToTerraform(struct.stepFunctions),
    };
}
export class IotTopicRuleErrorActionOutputReference 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._cloudwatchAlarm?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudwatchAlarm = this._cloudwatchAlarm?.internalValue;
        }
        if (this._cloudwatchMetric?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.cloudwatchMetric = this._cloudwatchMetric?.internalValue;
        }
        if (this._dynamodb?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.dynamodb = this._dynamodb?.internalValue;
        }
        if (this._dynamodbv2?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.dynamodbv2 = this._dynamodbv2?.internalValue;
        }
        if (this._elasticsearch?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.elasticsearch = this._elasticsearch?.internalValue;
        }
        if (this._firehose?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.firehose = this._firehose?.internalValue;
        }
        if (this._iotAnalytics?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.iotAnalytics = this._iotAnalytics?.internalValue;
        }
        if (this._iotEvents?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.iotEvents = this._iotEvents?.internalValue;
        }
        if (this._kinesis?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.kinesis = this._kinesis?.internalValue;
        }
        if (this._lambda?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.lambda = this._lambda?.internalValue;
        }
        if (this._republish?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.republish = this._republish?.internalValue;
        }
        if (this._s3?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.s3 = this._s3?.internalValue;
        }
        if (this._sns?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.sns = this._sns?.internalValue;
        }
        if (this._sqs?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.sqs = this._sqs?.internalValue;
        }
        if (this._stepFunctions?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.stepFunctions = this._stepFunctions?.internalValue;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._cloudwatchAlarm.internalValue = undefined;
            this._cloudwatchMetric.internalValue = undefined;
            this._dynamodb.internalValue = undefined;
            this._dynamodbv2.internalValue = undefined;
            this._elasticsearch.internalValue = undefined;
            this._firehose.internalValue = undefined;
            this._iotAnalytics.internalValue = undefined;
            this._iotEvents.internalValue = undefined;
            this._kinesis.internalValue = undefined;
            this._lambda.internalValue = undefined;
            this._republish.internalValue = undefined;
            this._s3.internalValue = undefined;
            this._sns.internalValue = undefined;
            this._sqs.internalValue = undefined;
            this._stepFunctions.internalValue = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._cloudwatchAlarm.internalValue = value.cloudwatchAlarm;
            this._cloudwatchMetric.internalValue = value.cloudwatchMetric;
            this._dynamodb.internalValue = value.dynamodb;
            this._dynamodbv2.internalValue = value.dynamodbv2;
            this._elasticsearch.internalValue = value.elasticsearch;
            this._firehose.internalValue = value.firehose;
            this._iotAnalytics.internalValue = value.iotAnalytics;
            this._iotEvents.internalValue = value.iotEvents;
            this._kinesis.internalValue = value.kinesis;
            this._lambda.internalValue = value.lambda;
            this._republish.internalValue = value.republish;
            this._s3.internalValue = value.s3;
            this._sns.internalValue = value.sns;
            this._sqs.internalValue = value.sqs;
            this._stepFunctions.internalValue = value.stepFunctions;
        }
    }
    // cloudwatch_alarm - computed: false, optional: true, required: false
    _cloudwatchAlarm = new IotTopicRuleErrorActionCloudwatchAlarmOutputReference(this, "cloudwatch_alarm", true);
    get cloudwatchAlarm() {
        return this._cloudwatchAlarm;
    }
    putCloudwatchAlarm(value) {
        this._cloudwatchAlarm.internalValue = value;
    }
    resetCloudwatchAlarm() {
        this._cloudwatchAlarm.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchAlarmInput() {
        return this._cloudwatchAlarm.internalValue;
    }
    // cloudwatch_metric - computed: false, optional: true, required: false
    _cloudwatchMetric = new IotTopicRuleErrorActionCloudwatchMetricOutputReference(this, "cloudwatch_metric", true);
    get cloudwatchMetric() {
        return this._cloudwatchMetric;
    }
    putCloudwatchMetric(value) {
        this._cloudwatchMetric.internalValue = value;
    }
    resetCloudwatchMetric() {
        this._cloudwatchMetric.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchMetricInput() {
        return this._cloudwatchMetric.internalValue;
    }
    // dynamodb - computed: false, optional: true, required: false
    _dynamodb = new IotTopicRuleErrorActionDynamodbOutputReference(this, "dynamodb", true);
    get dynamodb() {
        return this._dynamodb;
    }
    putDynamodb(value) {
        this._dynamodb.internalValue = value;
    }
    resetDynamodb() {
        this._dynamodb.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dynamodbInput() {
        return this._dynamodb.internalValue;
    }
    // dynamodbv2 - computed: false, optional: true, required: false
    _dynamodbv2 = new IotTopicRuleErrorActionDynamodbv2OutputReference(this, "dynamodbv2", true);
    get dynamodbv2() {
        return this._dynamodbv2;
    }
    putDynamodbv2(value) {
        this._dynamodbv2.internalValue = value;
    }
    resetDynamodbv2() {
        this._dynamodbv2.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dynamodbv2Input() {
        return this._dynamodbv2.internalValue;
    }
    // elasticsearch - computed: false, optional: true, required: false
    _elasticsearch = new IotTopicRuleErrorActionElasticsearchOutputReference(this, "elasticsearch", true);
    get elasticsearch() {
        return this._elasticsearch;
    }
    putElasticsearch(value) {
        this._elasticsearch.internalValue = value;
    }
    resetElasticsearch() {
        this._elasticsearch.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get elasticsearchInput() {
        return this._elasticsearch.internalValue;
    }
    // firehose - computed: false, optional: true, required: false
    _firehose = new IotTopicRuleErrorActionFirehoseOutputReference(this, "firehose", true);
    get firehose() {
        return this._firehose;
    }
    putFirehose(value) {
        this._firehose.internalValue = value;
    }
    resetFirehose() {
        this._firehose.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get firehoseInput() {
        return this._firehose.internalValue;
    }
    // iot_analytics - computed: false, optional: true, required: false
    _iotAnalytics = new IotTopicRuleErrorActionIotAnalyticsOutputReference(this, "iot_analytics", true);
    get iotAnalytics() {
        return this._iotAnalytics;
    }
    putIotAnalytics(value) {
        this._iotAnalytics.internalValue = value;
    }
    resetIotAnalytics() {
        this._iotAnalytics.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get iotAnalyticsInput() {
        return this._iotAnalytics.internalValue;
    }
    // iot_events - computed: false, optional: true, required: false
    _iotEvents = new IotTopicRuleErrorActionIotEventsOutputReference(this, "iot_events", true);
    get iotEvents() {
        return this._iotEvents;
    }
    putIotEvents(value) {
        this._iotEvents.internalValue = value;
    }
    resetIotEvents() {
        this._iotEvents.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get iotEventsInput() {
        return this._iotEvents.internalValue;
    }
    // kinesis - computed: false, optional: true, required: false
    _kinesis = new IotTopicRuleErrorActionKinesisOutputReference(this, "kinesis", true);
    get kinesis() {
        return this._kinesis;
    }
    putKinesis(value) {
        this._kinesis.internalValue = value;
    }
    resetKinesis() {
        this._kinesis.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kinesisInput() {
        return this._kinesis.internalValue;
    }
    // lambda - computed: false, optional: true, required: false
    _lambda = new IotTopicRuleErrorActionLambdaOutputReference(this, "lambda", true);
    get lambda() {
        return this._lambda;
    }
    putLambda(value) {
        this._lambda.internalValue = value;
    }
    resetLambda() {
        this._lambda.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lambdaInput() {
        return this._lambda.internalValue;
    }
    // republish - computed: false, optional: true, required: false
    _republish = new IotTopicRuleErrorActionRepublishOutputReference(this, "republish", true);
    get republish() {
        return this._republish;
    }
    putRepublish(value) {
        this._republish.internalValue = value;
    }
    resetRepublish() {
        this._republish.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get republishInput() {
        return this._republish.internalValue;
    }
    // s3 - computed: false, optional: true, required: false
    _s3 = new IotTopicRuleErrorActionS3OutputReference(this, "s3", true);
    get s3() {
        return this._s3;
    }
    putS3(value) {
        this._s3.internalValue = value;
    }
    resetS3() {
        this._s3.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3Input() {
        return this._s3.internalValue;
    }
    // sns - computed: false, optional: true, required: false
    _sns = new IotTopicRuleErrorActionSnsOutputReference(this, "sns", true);
    get sns() {
        return this._sns;
    }
    putSns(value) {
        this._sns.internalValue = value;
    }
    resetSns() {
        this._sns.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get snsInput() {
        return this._sns.internalValue;
    }
    // sqs - computed: false, optional: true, required: false
    _sqs = new IotTopicRuleErrorActionSqsOutputReference(this, "sqs", true);
    get sqs() {
        return this._sqs;
    }
    putSqs(value) {
        this._sqs.internalValue = value;
    }
    resetSqs() {
        this._sqs.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sqsInput() {
        return this._sqs.internalValue;
    }
    // step_functions - computed: false, optional: true, required: false
    _stepFunctions = new IotTopicRuleErrorActionStepFunctionsOutputReference(this, "step_functions", true);
    get stepFunctions() {
        return this._stepFunctions;
    }
    putStepFunctions(value) {
        this._stepFunctions.internalValue = value;
    }
    resetStepFunctions() {
        this._stepFunctions.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get stepFunctionsInput() {
        return this._stepFunctions.internalValue;
    }
}
export function iotTopicRuleFirehoseToTerraform(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 {
        delivery_stream_name: cdktf.stringToTerraform(struct.deliveryStreamName),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        separator: cdktf.stringToTerraform(struct.separator),
    };
}
export function iotTopicRuleIotAnalyticsToTerraform(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 {
        channel_name: cdktf.stringToTerraform(struct.channelName),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export function iotTopicRuleIotEventsToTerraform(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 {
        input_name: cdktf.stringToTerraform(struct.inputName),
        message_id: cdktf.stringToTerraform(struct.messageId),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export function iotTopicRuleKinesisToTerraform(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 {
        partition_key: cdktf.stringToTerraform(struct.partitionKey),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        stream_name: cdktf.stringToTerraform(struct.streamName),
    };
}
export function iotTopicRuleLambdaToTerraform(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 {
        function_arn: cdktf.stringToTerraform(struct.functionArn),
    };
}
export function iotTopicRuleRepublishToTerraform(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 {
        qos: cdktf.numberToTerraform(struct.qos),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        topic: cdktf.stringToTerraform(struct.topic),
    };
}
export function iotTopicRuleS3ToTerraform(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 {
        bucket_name: cdktf.stringToTerraform(struct.bucketName),
        key: cdktf.stringToTerraform(struct.key),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
    };
}
export function iotTopicRuleSnsToTerraform(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 {
        message_format: cdktf.stringToTerraform(struct.messageFormat),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        target_arn: cdktf.stringToTerraform(struct.targetArn),
    };
}
export function iotTopicRuleSqsToTerraform(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 {
        queue_url: cdktf.stringToTerraform(struct.queueUrl),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        use_base64: cdktf.booleanToTerraform(struct.useBase64),
    };
}
export function iotTopicRuleStepFunctionsToTerraform(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 {
        execution_name_prefix: cdktf.stringToTerraform(struct.executionNamePrefix),
        role_arn: cdktf.stringToTerraform(struct.roleArn),
        state_machine_name: cdktf.stringToTerraform(struct.stateMachineName),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/iot_topic_rule aws_iot_topic_rule}
*/
export class IotTopicRule extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_iot_topic_rule";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/iot_topic_rule aws_iot_topic_rule} 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 IotTopicRuleConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_iot_topic_rule',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._description = config.description;
        this._enabled = config.enabled;
        this._name = config.name;
        this._sql = config.sql;
        this._sqlVersion = config.sqlVersion;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._cloudwatchAlarm = config.cloudwatchAlarm;
        this._cloudwatchMetric = config.cloudwatchMetric;
        this._dynamodb = config.dynamodb;
        this._dynamodbv2 = config.dynamodbv2;
        this._elasticsearch = config.elasticsearch;
        this._errorAction.internalValue = config.errorAction;
        this._firehose = config.firehose;
        this._iotAnalytics = config.iotAnalytics;
        this._iotEvents = config.iotEvents;
        this._kinesis = config.kinesis;
        this._lambda = config.lambda;
        this._republish = config.republish;
        this._s3 = config.s3;
        this._sns = config.sns;
        this._sqs = config.sqs;
        this._stepFunctions = config.stepFunctions;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // enabled - computed: false, optional: false, required: true
    _enabled;
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    set enabled(value) {
        this._enabled = value;
    }
    // Temporarily expose input value. Use with caution.
    get enabledInput() {
        return this._enabled;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // sql - computed: false, optional: false, required: true
    _sql;
    get sql() {
        return this.getStringAttribute('sql');
    }
    set sql(value) {
        this._sql = value;
    }
    // Temporarily expose input value. Use with caution.
    get sqlInput() {
        return this._sql;
    }
    // sql_version - computed: false, optional: false, required: true
    _sqlVersion;
    get sqlVersion() {
        return this.getStringAttribute('sql_version');
    }
    set sqlVersion(value) {
        this._sqlVersion = value;
    }
    // Temporarily expose input value. Use with caution.
    get sqlVersionInput() {
        return this._sqlVersion;
    }
    // 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;
    }
    // cloudwatch_alarm - computed: false, optional: true, required: false
    _cloudwatchAlarm;
    get cloudwatchAlarm() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('cloudwatch_alarm')));
    }
    set cloudwatchAlarm(value) {
        this._cloudwatchAlarm = value;
    }
    resetCloudwatchAlarm() {
        this._cloudwatchAlarm = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchAlarmInput() {
        return this._cloudwatchAlarm;
    }
    // cloudwatch_metric - computed: false, optional: true, required: false
    _cloudwatchMetric;
    get cloudwatchMetric() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('cloudwatch_metric')));
    }
    set cloudwatchMetric(value) {
        this._cloudwatchMetric = value;
    }
    resetCloudwatchMetric() {
        this._cloudwatchMetric = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get cloudwatchMetricInput() {
        return this._cloudwatchMetric;
    }
    // dynamodb - computed: false, optional: true, required: false
    _dynamodb;
    get dynamodb() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('dynamodb')));
    }
    set dynamodb(value) {
        this._dynamodb = value;
    }
    resetDynamodb() {
        this._dynamodb = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dynamodbInput() {
        return this._dynamodb;
    }
    // dynamodbv2 - computed: false, optional: true, required: false
    _dynamodbv2;
    get dynamodbv2() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('dynamodbv2')));
    }
    set dynamodbv2(value) {
        this._dynamodbv2 = value;
    }
    resetDynamodbv2() {
        this._dynamodbv2 = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dynamodbv2Input() {
        return this._dynamodbv2;
    }
    // elasticsearch - computed: false, optional: true, required: false
    _elasticsearch;
    get elasticsearch() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('elasticsearch')));
    }
    set elasticsearch(value) {
        this._elasticsearch = value;
    }
    resetElasticsearch() {
        this._elasticsearch = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get elasticsearchInput() {
        return this._elasticsearch;
    }
    // error_action - computed: false, optional: true, required: false
    _errorAction = new IotTopicRuleErrorActionOutputReference(this, "error_action", true);
    get errorAction() {
        return this._errorAction;
    }
    putErrorAction(value) {
        this._errorAction.internalValue = value;
    }
    resetErrorAction() {
        this._errorAction.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get errorActionInput() {
        return this._errorAction.internalValue;
    }
    // firehose - computed: false, optional: true, required: false
    _firehose;
    get firehose() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('firehose')));
    }
    set firehose(value) {
        this._firehose = value;
    }
    resetFirehose() {
        this._firehose = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get firehoseInput() {
        return this._firehose;
    }
    // iot_analytics - computed: false, optional: true, required: false
    _iotAnalytics;
    get iotAnalytics() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('iot_analytics')));
    }
    set iotAnalytics(value) {
        this._iotAnalytics = value;
    }
    resetIotAnalytics() {
        this._iotAnalytics = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get iotAnalyticsInput() {
        return this._iotAnalytics;
    }
    // iot_events - computed: false, optional: true, required: false
    _iotEvents;
    get iotEvents() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('iot_events')));
    }
    set iotEvents(value) {
        this._iotEvents = value;
    }
    resetIotEvents() {
        this._iotEvents = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get iotEventsInput() {
        return this._iotEvents;
    }
    // kinesis - computed: false, optional: true, required: false
    _kinesis;
    get kinesis() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('kinesis')));
    }
    set kinesis(value) {
        this._kinesis = value;
    }
    resetKinesis() {
        this._kinesis = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kinesisInput() {
        return this._kinesis;
    }
    // lambda - computed: false, optional: true, required: false
    _lambda;
    get lambda() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('lambda')));
    }
    set lambda(value) {
        this._lambda = value;
    }
    resetLambda() {
        this._lambda = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get lambdaInput() {
        return this._lambda;
    }
    // republish - computed: false, optional: true, required: false
    _republish;
    get republish() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('republish')));
    }
    set republish(value) {
        this._republish = value;
    }
    resetRepublish() {
        this._republish = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get republishInput() {
        return this._republish;
    }
    // s3 - computed: false, optional: true, required: false
    _s3;
    get s3() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('s3')));
    }
    set s3(value) {
        this._s3 = value;
    }
    resetS3() {
        this._s3 = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get s3Input() {
        return this._s3;
    }
    // sns - computed: false, optional: true, required: false
    _sns;
    get sns() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('sns')));
    }
    set sns(value) {
        this._sns = value;
    }
    resetSns() {
        this._sns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get snsInput() {
        return this._sns;
    }
    // sqs - computed: false, optional: true, required: false
    _sqs;
    get sqs() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('sqs')));
    }
    set sqs(value) {
        this._sqs = value;
    }
    resetSqs() {
        this._sqs = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sqsInput() {
        return this._sqs;
    }
    // step_functions - computed: false, optional: true, required: false
    _stepFunctions;
    get stepFunctions() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('step_functions')));
    }
    set stepFunctions(value) {
        this._stepFunctions = value;
    }
    resetStepFunctions() {
        this._stepFunctions = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get stepFunctionsInput() {
        return this._stepFunctions;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            description: cdktf.stringToTerraform(this._description),
            enabled: cdktf.booleanToTerraform(this._enabled),
            name: cdktf.stringToTerraform(this._name),
            sql: cdktf.stringToTerraform(this._sql),
            sql_version: cdktf.stringToTerraform(this._sqlVersion),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            cloudwatch_alarm: cdktf.listMapper(iotTopicRuleCloudwatchAlarmToTerraform)(this._cloudwatchAlarm),
            cloudwatch_metric: cdktf.listMapper(iotTopicRuleCloudwatchMetricToTerraform)(this._cloudwatchMetric),
            dynamodb: cdktf.listMapper(iotTopicRuleDynamodbToTerraform)(this._dynamodb),
            dynamodbv2: cdktf.listMapper(iotTopicRuleDynamodbv2ToTerraform)(this._dynamodbv2),
            elasticsearch: cdktf.listMapper(iotTopicRuleElasticsearchToTerraform)(this._elasticsearch),
            error_action: iotTopicRuleErrorActionToTerraform(this._errorAction.internalValue),
            firehose: cdktf.listMapper(iotTopicRuleFirehoseToTerraform)(this._firehose),
            iot_analytics: cdktf.listMapper(iotTopicRuleIotAnalyticsToTerraform)(this._iotAnalytics),
            iot_events: cdktf.listMapper(iotTopicRuleIotEventsToTerraform)(this._iotEvents),
            kinesis: cdktf.listMapper(iotTopicRuleKinesisToTerraform)(this._kinesis),
            lambda: cdktf.listMapper(iotTopicRuleLambdaToTerraform)(this._lambda),
            republish: cdktf.listMapper(iotTopicRuleRepublishToTerraform)(this._republish),
            s3: cdktf.listMapper(iotTopicRuleS3ToTerraform)(this._s3),
            sns: cdktf.listMapper(iotTopicRuleSnsToTerraform)(this._sns),
            sqs: cdktf.listMapper(iotTopicRuleSqsToTerraform)(this._sqs),
            step_functions: cdktf.listMapper(iotTopicRuleStepFunctionsToTerraform)(this._stepFunctions),
        };
    }
}
//# sourceMappingURL=iot-topic-rule.js.map