// generated from terraform resource schema
import * as cdktf from 'cdktf';
export class DataAwsDynamodbTableAttribute extends cdktf.ComplexComputedList {
    // name - computed: true, optional: false, required: false
    get name() {
        return this.getStringAttribute('name');
    }
    // type - computed: true, optional: false, required: false
    get type() {
        return this.getStringAttribute('type');
    }
}
export class DataAwsDynamodbTableGlobalSecondaryIndex extends cdktf.ComplexComputedList {
    // hash_key - computed: true, optional: false, required: false
    get hashKey() {
        return this.getStringAttribute('hash_key');
    }
    // name - computed: true, optional: false, required: false
    get name() {
        return this.getStringAttribute('name');
    }
    // non_key_attributes - computed: true, optional: false, required: false
    get nonKeyAttributes() {
        return this.getListAttribute('non_key_attributes');
    }
    // projection_type - computed: true, optional: false, required: false
    get projectionType() {
        return this.getStringAttribute('projection_type');
    }
    // range_key - computed: true, optional: false, required: false
    get rangeKey() {
        return this.getStringAttribute('range_key');
    }
    // read_capacity - computed: true, optional: false, required: false
    get readCapacity() {
        return this.getNumberAttribute('read_capacity');
    }
    // write_capacity - computed: true, optional: false, required: false
    get writeCapacity() {
        return this.getNumberAttribute('write_capacity');
    }
}
export class DataAwsDynamodbTableLocalSecondaryIndex extends cdktf.ComplexComputedList {
    // name - computed: true, optional: false, required: false
    get name() {
        return this.getStringAttribute('name');
    }
    // non_key_attributes - computed: true, optional: false, required: false
    get nonKeyAttributes() {
        return this.getListAttribute('non_key_attributes');
    }
    // projection_type - computed: true, optional: false, required: false
    get projectionType() {
        return this.getStringAttribute('projection_type');
    }
    // range_key - computed: true, optional: false, required: false
    get rangeKey() {
        return this.getStringAttribute('range_key');
    }
}
export class DataAwsDynamodbTablePointInTimeRecovery extends cdktf.ComplexComputedList {
    // enabled - computed: true, optional: false, required: false
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
}
export class DataAwsDynamodbTableReplica extends cdktf.ComplexComputedList {
    // kms_key_arn - computed: true, optional: false, required: false
    get kmsKeyArn() {
        return this.getStringAttribute('kms_key_arn');
    }
    // region_name - computed: true, optional: false, required: false
    get regionName() {
        return this.getStringAttribute('region_name');
    }
}
export class DataAwsDynamodbTableTtl extends cdktf.ComplexComputedList {
    // attribute_name - computed: true, optional: false, required: false
    get attributeName() {
        return this.getStringAttribute('attribute_name');
    }
    // enabled - computed: true, optional: false, required: false
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
}
export function dataAwsDynamodbTableServerSideEncryptionToTerraform(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 {};
}
export class DataAwsDynamodbTableServerSideEncryptionOutputReference 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 = {};
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
        }
    }
    // enabled - computed: true, optional: false, required: false
    get enabled() {
        return this.getBooleanAttribute('enabled');
    }
    // kms_key_arn - computed: true, optional: false, required: false
    get kmsKeyArn() {
        return this.getStringAttribute('kms_key_arn');
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/d/dynamodb_table aws_dynamodb_table}
*/
export class DataAwsDynamodbTable extends cdktf.TerraformDataSource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_dynamodb_table";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/d/dynamodb_table aws_dynamodb_table} Data Source
    *
    * @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 DataAwsDynamodbTableConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_dynamodb_table',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._name = config.name;
        this._tags = config.tags;
        this._serverSideEncryption.internalValue = config.serverSideEncryption;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // attribute - computed: true, optional: false, required: false
    attribute(index) {
        return new DataAwsDynamodbTableAttribute(this, 'attribute', index, true);
    }
    // billing_mode - computed: true, optional: false, required: false
    get billingMode() {
        return this.getStringAttribute('billing_mode');
    }
    // global_secondary_index - computed: true, optional: false, required: false
    globalSecondaryIndex(index) {
        return new DataAwsDynamodbTableGlobalSecondaryIndex(this, 'global_secondary_index', index, true);
    }
    // hash_key - computed: true, optional: false, required: false
    get hashKey() {
        return this.getStringAttribute('hash_key');
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // local_secondary_index - computed: true, optional: false, required: false
    localSecondaryIndex(index) {
        return new DataAwsDynamodbTableLocalSecondaryIndex(this, 'local_secondary_index', index, true);
    }
    // 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;
    }
    // point_in_time_recovery - computed: true, optional: false, required: false
    pointInTimeRecovery(index) {
        return new DataAwsDynamodbTablePointInTimeRecovery(this, 'point_in_time_recovery', index, false);
    }
    // range_key - computed: true, optional: false, required: false
    get rangeKey() {
        return this.getStringAttribute('range_key');
    }
    // read_capacity - computed: true, optional: false, required: false
    get readCapacity() {
        return this.getNumberAttribute('read_capacity');
    }
    // replica - computed: true, optional: false, required: false
    replica(index) {
        return new DataAwsDynamodbTableReplica(this, 'replica', index, true);
    }
    // stream_arn - computed: true, optional: false, required: false
    get streamArn() {
        return this.getStringAttribute('stream_arn');
    }
    // stream_enabled - computed: true, optional: false, required: false
    get streamEnabled() {
        return this.getBooleanAttribute('stream_enabled');
    }
    // stream_label - computed: true, optional: false, required: false
    get streamLabel() {
        return this.getStringAttribute('stream_label');
    }
    // stream_view_type - computed: true, optional: false, required: false
    get streamViewType() {
        return this.getStringAttribute('stream_view_type');
    }
    // table_class - computed: true, optional: false, required: false
    get tableClass() {
        return this.getStringAttribute('table_class');
    }
    // tags - computed: true, 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;
    }
    // ttl - computed: true, optional: false, required: false
    ttl(index) {
        return new DataAwsDynamodbTableTtl(this, 'ttl', index, true);
    }
    // write_capacity - computed: true, optional: false, required: false
    get writeCapacity() {
        return this.getNumberAttribute('write_capacity');
    }
    // server_side_encryption - computed: false, optional: true, required: false
    _serverSideEncryption = new DataAwsDynamodbTableServerSideEncryptionOutputReference(this, "server_side_encryption", true);
    get serverSideEncryption() {
        return this._serverSideEncryption;
    }
    putServerSideEncryption(value) {
        this._serverSideEncryption.internalValue = value;
    }
    resetServerSideEncryption() {
        this._serverSideEncryption.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get serverSideEncryptionInput() {
        return this._serverSideEncryption.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            name: cdktf.stringToTerraform(this._name),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            server_side_encryption: dataAwsDynamodbTableServerSideEncryptionToTerraform(this._serverSideEncryption.internalValue),
        };
    }
}
//# sourceMappingURL=data-aws-dynamodb-table.js.map