// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function dataAwsKmsSecretsSecretToTerraform(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 {
        context: cdktf.hashMapper(cdktf.stringToTerraform)(struct.context),
        grant_tokens: cdktf.listMapper(cdktf.stringToTerraform)(struct.grantTokens),
        name: cdktf.stringToTerraform(struct.name),
        payload: cdktf.stringToTerraform(struct.payload),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/d/kms_secrets aws_kms_secrets}
*/
export class DataAwsKmsSecrets extends cdktf.TerraformDataSource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_kms_secrets";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/d/kms_secrets aws_kms_secrets} 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 DataAwsKmsSecretsConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_kms_secrets',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._secret = config.secret;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // plaintext - computed: true, optional: false, required: false
    plaintext(key) {
        return new cdktf.StringMap(this, 'plaintext').lookup(key);
    }
    // secret - computed: false, optional: false, required: true
    _secret;
    get secret() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('secret')));
    }
    set secret(value) {
        this._secret = value;
    }
    // Temporarily expose input value. Use with caution.
    get secretInput() {
        return this._secret;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            secret: cdktf.listMapper(dataAwsKmsSecretsSecretToTerraform)(this._secret),
        };
    }
}
//# sourceMappingURL=data-aws-kms-secrets.js.map